示例#1
0
 def __call__(self, name=None):
     if name is None:
         name = self.name
     elif ':' in name:
         name = name.split(':')[0]
     return tf_var_from_shape(name, None, self.dtype,
                              len(self.broadcastable))
示例#2
0
def tensor4(name, dtype=None, fixed_shape=None):
    return tf_var_from_shape(name, fixed_shape, dtype, ndim=4)
示例#3
0
def vector(name, dtype=None, fixed_shape=None):
    return tf_var_from_shape(str(name), fixed_shape, dtype, ndim=1)
示例#4
0
def matrix(name, dtype=None, fixed_shape=None):
    return tf_var_from_shape(name, fixed_shape, dtype, ndim=2)
示例#5
0
文件: api.py 项目: MLDL/tensorfuse
def tensor4(name, dtype=None, fixed_shape=None):
    return tf_var_from_shape(name, fixed_shape, dtype, ndim=4)
示例#6
0
文件: api.py 项目: MLDL/tensorfuse
def vector(name, dtype=None, fixed_shape=None):
    return tf_var_from_shape(str(name), fixed_shape, dtype, ndim=1)
示例#7
0
文件: api.py 项目: MLDL/tensorfuse
def matrix(name, dtype=None, fixed_shape=None):
    return tf_var_from_shape(name, fixed_shape, dtype, ndim=2)
示例#8
0
文件: api.py 项目: MLDL/tensorfuse
 def __call__(self, name=None):
     if name is None:
         name = self.name
     elif ':' in name:
         name = name.split(':')[0]
     return tf_var_from_shape(name, None, self.dtype, len(self.broadcastable))