MCPcopy
hub / github.com/huggingface/transformers.js / mul

Method mul

packages/transformers/src/utils/tensor.js:254–256  ·  view source on GitHub ↗

* Return a new Tensor with every element multiplied by a constant. * @param {number} val The value to multiply by. * @returns {Tensor} The new tensor.

(val)

Source from the content-addressed store, hash-verified

252 * @returns {Tensor} The new tensor.
253 */
254 mul(val) {
255 return this.clone().mul_(val);
256 }
257
258 /**
259 * Multiply the tensor by a constant in place.

Callers 1

tensor.test.jsFile · 0.80

Calls 2

cloneMethod · 0.95
mul_Method · 0.80

Tested by

no test coverage detected