Module

Class

Methods

# inner arrayFromTensor(tensor) → {Array}

Returns the tensor data as a nested array. The transfer of data is done synchronously.
Parameters:
Name Type Description
tensor Tensor The tensor to convert.

View Source

tensor.arraySync().
Array

# inner tensorShape(tensor) → {Array}

Gets the shape of a TensorFlow.js tensor.
Parameters:
Name Type Description
tensor Tensor The tensor to find shape.

View Source

tensor.shape.
Array

# inner valueFromTensorShape(tensor, index) → {Number|Array.<Number>}

Gets the value at a specific index of a TensorFlow.js tensor's shape.
Parameters:
Name Type Description
tensor Tensor The tensor to find shape.
index Number The index

View Source

tensor.shape[index].
Number | Array.<Number>