/TensorFlow 2.4


Creates a tensor with the given shape.

This operation creates a tensor of shape and dtype.

Args: shape: A Tensor of type int32. 1-D. Represents the shape of the output tensor. dtype: A tf.DType. init: An optional bool. Defaults to False. If True, initialize the returned tensor with the default value of dtype. Otherwise, the implementation is free not to initializethe tensor's content. name: A name for the operation (optional).

Returns: A Tensor of type dtype.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.