Returns the size (number of elements) of the tensor given its shape.
const shape = [3, 4, 2];const size = tf.util.sizeFromShape(shape);console.log(size); Copy
const shape = [3, 4, 2];const size = tf.util.sizeFromShape(shape);console.log(size);
Generated using TypeDoc
Returns the size (number of elements) of the tensor given its shape.