MCPcopy
hub / github.com/tensorflow/tfjs / onesLike

Function onesLike

tfjs-layers/src/variables.ts:206–210  ·  view source on GitHub ↗
(
    x: Tensor, dtype?: DataType, name?: string)

Source from the content-addressed store, hash-verified

204 * @return A newly instantiated Variable.
205 */
206export function onesLike(
207 x: Tensor, dtype?: DataType, name?: string): LayerVariable {
208 const allocated = tfc.onesLike(x);
209 return new LayerVariable(allocated, dtype, name);
210}
211
212/**
213 * Instantiate an identity matrix and returns it, as a Variable

Callers 2

ones_like.tsFile · 0.50

Calls 1

onesLikeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…