chore: update node_modules with new binary files and dependencies
- Add new binary files for nodemon, onnxruntime-web, and xenova/transformers - Update various JavaScript and TypeScript files in node_modules - Remove unused files and dependencies - Add new test fixtures and documentation files
This commit is contained in:
16
node_modules/onnxruntime-web/lib/onnxjs/backends/webgl/ops/shape.ts
generated
vendored
Normal file
16
node_modules/onnxruntime-web/lib/onnxjs/backends/webgl/ops/shape.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {Tensor} from '../../../tensor';
|
||||
import {WebGLInferenceHandler} from '../inference-handler';
|
||||
|
||||
export const shape = (inferenceHandler: WebGLInferenceHandler, inputs: Tensor[]): Tensor[] => {
|
||||
validateInputs(inputs);
|
||||
return [new Tensor([inputs[0].dims.length], 'int32', undefined, undefined, new Int32Array(inputs[0].dims))];
|
||||
};
|
||||
|
||||
const validateInputs = (inputs: Tensor[]): void => {
|
||||
if (!inputs || inputs.length !== 1) {
|
||||
throw new Error('Shape requires 1 input.');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user