You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
I would like to know if the Tensor() in onnx.js would support mask token.
I am using the 'bert-base-cased' model to predict the masked text. https://huggingface.co/bert-base-cased
`const onnx = require('onnxjs-node');
async function main() {
const url = "model_output/bert-base-cased.onnx";
const session = new onnx.InferenceSession();
await session.loadModel(url);
// const inputs = [new onnx.Tensor(["I", "<MASK>","to","mars"], "string"), ] **# I would require help here of how we can provide a input.**
const inputs = [new onnx.Tensor([])
session.run(inputs)
.then(
(data) => {
console.log("+++++++++++++++ SUCCESS +++++++++++++");
console.log(data);
console.log(data.values.next().value);
}
)
.catch(
(error) => {
console.log("---------------- ERROR --------------");
console.log(error);
}
);
}
main();
`
Any help would be greatly appreciated.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
For running ONNX model inferencing in Node.js, onnxjs-node is replaced by ONNX Runtime Node.js binding. This uses the up-to-date ONNXRuntime backend (v1.8), while onnxjs-node uses ONNXRuntime v1.4
please check it out to see if it resolves the issue.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I would like to know if the Tensor() in onnx.js would support mask token.
I am using the 'bert-base-cased' model to predict the masked text. https://huggingface.co/bert-base-cased
`const onnx = require('onnxjs-node');
async function main() {
const url = "model_output/bert-base-cased.onnx";
}
main();
`
Any help would be greatly appreciated.
Thanks in advance.
The text was updated successfully, but these errors were encountered: