MCPcopy Create free account
hub / github.com/benoitsteiner/tensorflow-opencl / ones

Function ones

tensorflow/python/ops/array_ops.py:1564–1595  ·  view source on GitHub ↗

Creates a tensor with all elements set to 1. This operation returns a tensor of type `dtype` with shape `shape` and all elements set to 1. For example: ```python tf.ones([2, 3], tf.int32) # [[1, 1, 1], [1, 1, 1]] ``` Args: shape: A list of integers, a tuple of integers, or a 1

(shape, dtype=dtypes.float32, name=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Calls 2

constantFunction · 0.90
name_scopeMethod · 0.80