Files
bella/node_modules/onnxruntime-web/lib/onnxjs/backends/webgl/ops/shape.js
你的名字 4c2f5c69a1 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
2025-07-18 08:41:48 +08:00

17 lines
637 B
JavaScript

"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.shape = void 0;
const tensor_1 = require("../../../tensor");
const shape = (inferenceHandler, inputs) => {
validateInputs(inputs);
return [new tensor_1.Tensor([inputs[0].dims.length], 'int32', undefined, undefined, new Int32Array(inputs[0].dims))];
};
exports.shape = shape;
const validateInputs = (inputs) => {
if (!inputs || inputs.length !== 1) {
throw new Error('Shape requires 1 input.');
}
};
//# sourceMappingURL=shape.js.map