Skip to content

Implement tf.zeros #143

Closed
Closed

Description

@Oceania2018

Creates a tensor with all elements set to zero.
This operation returns a tensor of type dtype with shape shape and all elements set to zero.

@tf_export("zeros")
def zeros(shape, dtype=dtypes.float32, name=None):

For example:

tf.zeros([3, 4], tf.int32)  # [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]

Activity

  1. added
    enhancement
    on Jan 28, 2019
  2. added this to the v0.1 Tensor milestone on Jan 28, 2019
  3. self-assigned this
    on Jan 28, 2019
  4. Oceania2018 commented on Jan 28, 2019

    @Oceania2018
    MemberAuthor

    Support small size zeros and big size zeros. if size > 1000, TF.NET will allocate memory until session runs.

  5. added a commit that references this issue on Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions