Skip to content

isTensor

isTensor(x): boolean

Defined in: tensor.js:89

Is this already a tensor, { data: Float64Array, shape }? The form a caller may use for a parameter when it wants its gradient back as the same thing, with no conversion to nested arrays on either side.

Parameters

x

any

Returns

boolean