def __init__(self, shape, dtype='float32', name=None):
super(Tensor, self).__init__(input_type=tdt.PyObjectType(),
output_type=tdt.TensorType(shape, dtype),
name=name)
self._dtype = np.dtype(self.output_type.dtype)
if not shape and tf.as_dtype(dtype).is_integer: # memoize scalar ints
self._evaluate = self._evaluate_memoized
评论列表
文章目录