cannot resolve operator 'Cast' with opsets: ai.onnx v17 [Web] #21115
Labels
platform:web
issues related to ONNX Runtime web; typically submitted using template
stale
issues that have not been addressed in a while; categorized by a bot
Describe the issue
I am using https://github.com/microsoft/onnxruntime-web-demo When testing my model, this issue occurred. My onnx was exported from pytorch 2.1.0+cu11.8, and I am not sure if it is a version compatibility issue.
This issue occurs in the async initSession() function.
I am using https://github.com/microsoft/onnxruntime-inference-examples/blob/main/js/quick-start_onnxruntime-web-bundler The sample method in did not encounter this issue when loading my onnx model,
To reproduce
My onnx model has also been uploaded in zip。
model.zip
my initSession()function is following:
async initSession() {
const node_emb = [0.016612321138381958, 0.32479220628738403, -0.17480510473251343, 0.22171857953071594, -0.03362815082073212, -0.5541449189186096, -0.2134913206100464, 0.2579418420791626, 0.028158824890851974, -0.213491290807724, 0.2579419016838074, 0.028158817440271378, -0.29980212450027466, 0.05575799569487572, 0.13522188365459442, 0.0867883488535881, -0.236801415681839, -0.4331217110157013, 0.32896843552589417, 0.2346162348985672, -0.2873727083206177, -0.23857513070106506, -0.17035554349422455, 0.1389528214931488, -0.38259392976760864, 0.3879542648792267, 0.037937164306640625, 0.49905404448509216, 0.11682555079460144, 0.37333834171295166, -0.14307904243469238, -0.4935119152069092, 0.05580680072307587, 0.3595126271247864, 0.10027752816677094, 0.3577460050582886, -0.07288319617509842, -0.29953575134277344, 0.03781317174434662, 0.2026776224374771, -0.1408967673778534, 0.2797025144100189, -0.0728832334280014, -0.29953569173812866, 0.037813249975442886];
const node_level = [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4];
const pos = [-0.6719708442687988, -0.17349961400032043, -0.07278412580490112, -0.4342332184314728, 0.565944254398346, 1.124698519706726, 1.1682472229003906, 0.679757833480835, 0.7840494513511658, 0.9343644380569458, 0.8223643898963928, 0.09227360785007477, -0.47061389684677124, 0.07232263684272766, -0.8676600456237793, -0.5899250507354736, -1.1705106496810913, 0.401921808719635, 0.01343536376953125, -0.16409379243850708, 0.678995668888092, -0.49010971188545227, -1.7985889911651611, -1.0793498754501343, -0.476369708776474, 0.26042065024375916, 0.16324150562286377, 0.22609102725982666, 1.3322205543518066, -0.8606394529342651];
const edge_index = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 0, 2, 4, 5, 6, 7, 8, 10, 12, 13, 14, 0, 2, 3, 5, 6, 7, 8, 10, 12, 13, 14, 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 13, 0, 1, 2, 3, 4, 5, 8, 9, 10, 12, 13, 14, 0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 14, 0, 1, 5, 6, 7, 8, 10, 11, 12, 13, 14, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 0, 1, 6, 9, 10, 13, 0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 13, 14, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 13];
const edge_type = [2, 2, 2, 2, 3, 1, 3, 1, 2, 2, 3, 3, 3, 3, 2, 1, 1, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 2, 3, 3, 3, 1, 2, 3, 3, 3, 2, 2, 2, 3, 3, 3, 1, 2, 3, 3, 3, 2, 2, 2, 3, 3, 1, 1, 2, 3, 3, 3, 3, 1, 3, 3, 3, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 3, 3, 3, 2, 2, 1, 3, 2, 2, 3, 3, 3, 3, 1, 2, 2, 3, 1, 2, 2, 2, 1, 3, 1, 1, 1, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 3, 1, 3, 3, 2, 1, 3, 1, 3, 2, 2, 2, 2, 2, 1, 3, 1, 1, 2, 3, 1, 1, 1, 3, 3, 2, 1, 3, 2, 3, 3, 3, 3, 3, 2, 2, 2, 3, 1, 2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 3, 1, 2, 2];
}
Urgency
I hope to receive help as soon as possible. I don't have much time left
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
Execution Provider
'webgl' (WebGL), 'wasm'/'cpu' (WebAssembly CPU)
The text was updated successfully, but these errors were encountered: