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

Function tensor

tfjs-core/src/ops/tensor.ts:204–209  ·  view source on GitHub ↗
(
    values: TensorLike|WebGLData|WebGPUData, shape?: ShapeMap[R],
    dtype?: DataType)

Source from the content-addressed store, hash-verified

202 * @doc {heading: 'Tensors', subheading: 'Creation'}
203 */
204export function tensor<R extends Rank>(
205 values: TensorLike|WebGLData|WebGPUData, shape?: ShapeMap[R],
206 dtype?: DataType): Tensor<R> {
207 const inferredShape = inferShape(values, dtype);
208 return makeTensor(values, shape, inferredShape, dtype) as Tensor<R>;
209}

Callers 15

predictMethod · 0.90
fakeMetricFunction · 0.90
centerCropMethod · 0.90

Calls 2

inferShapeFunction · 0.90
makeTensorFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…