This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Description
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.