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

Method add

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

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

(val)

Source from the content-addressed store, hash-verified

296 * @returns {Tensor} The new tensor.
297 */
298 add(val) {
299 return this.clone().add_(val);
300 }
301
302 /**
303 * Add the tensor by a constant in place.

Callers 5

getCacheNamesFunction · 0.80
getKeyValueNamesFunction · 0.80
_validate_model_classMethod · 0.80
get_target_ratiosFunction · 0.80
tensor.test.jsFile · 0.80

Calls 2

cloneMethod · 0.95
add_Method · 0.80

Tested by

no test coverage detected