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

Method call

tfjs-layers/src/layers/preprocessing/image_preprocessing.ts:55–63  ·  view source on GitHub ↗
(inputs: Tensor|Tensor[], kwargs: Kwargs)

Source from the content-addressed store, hash-verified

53 }
54
55 override call(inputs: Tensor|Tensor[], kwargs: Kwargs): Tensor[]|Tensor {
56 return tidy(() => {
57 inputs = getExactlyOneTensor(inputs);
58 if(inputs.dtype !== 'float32') {
59 inputs = K.cast(inputs, 'float32');
60 }
61 return add(mul(inputs, this.scale), this.offset);
62 });
63 }
64}
65
66serialization.registerClass(Rescaling);

Callers

nothing calls this directly

Calls 4

tidyFunction · 0.90
getExactlyOneTensorFunction · 0.90
addFunction · 0.90
castMethod · 0.65

Tested by

no test coverage detected