# 创建任意维度,内部元素全是0的constant常量
tf.zeros(shape, dtype=tf.float32, name=None)
# create a tensor of shape and...all elements are zeros
tf.zeros([2,3], tf.int32) ==> [[0, 0, 0], [0, 0, 0]]
# 创建和input_tensor维度相同,全是...1], [2, 3], [4, 5]]
tf.zeros_like(input_tensor) ==> [[0, 0], [0, 0], [0, 0]]
# 创建任意维度,值全是1的常量
tf.ones...1], [2, 3], [4, 5]]
tf.ones_like(input_tensor) ==> [[1, 1], [1, 1], [1, 1]]
# 创建任意维度,内部值都相同的常量
tf.fill...: a doesn’t an actual value
运行上述代码会抛出异常:InvalidArgumentError: a doesn’t an actual value表示a的值不知道。