Hi, guys
when I do mod, params = relay.frontend.from_pytorch(scripted_model, shape_list)
to transfer a pytorch model to a Relay IR, error happened.
Traceback (most recent call last):
File "from_torch_test.py", line 99, in <module>
mod, params = relay.frontend.from_pytorch(scripted_model, shape_list)
File "/cpfs01/user/zhangyuchang/projects/tvm/python/tvm/relay/frontend/pytorch.py", line 5032, in from_pytorch
outputs = converter.convert_operators(operator_nodes, outputs, ret_name)
File "/cpfs01/user/zhangyuchang/projects/tvm/python/tvm/relay/frontend/pytorch.py", line 4285, in convert_operators
relay_out = relay_op(
File "/cpfs01/user/zhangyuchang/projects/tvm/python/tvm/relay/frontend/pytorch.py", line 2703, in index_put
return _op.scatter_nd(in_tensor, index_tensor, values, mode)
File "/cpfs01/user/zhangyuchang/projects/tvm/python/tvm/relay/op/transform.py", line 422, in scatter_nd
return _make.scatter_nd(data, indices, updates, mode)
File "/cpfs01/user/zhangyuchang/projects/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 239, in __call__
raise_last_ffi_error()
File "/cpfs01/user/zhangyuchang/projects/tvm/python/tvm/_ffi/base.py", line 476, in raise_last_ffi_error
raise py_err
tvm._ffi.base.TVMError: Traceback (most recent call last):
2: _ZN3tvm7runtime13PackedFun
1: tvm::runtime::TypedPackedFunc<tvm::RelayExpr (tvm::RelayExpr, tvm::RelayExpr, tvm::RelayExpr, tvm::runtime::String)>::AssignTypedLambda<tvm::RelayExpr (*)(tvm::RelayExpr, tvm::RelayExpr, tvm::RelayExpr, tvm::runtime::String)>(tvm::RelayExpr (*)(tvm::RelayExpr, tvm::RelayExpr, tvm::RelayExpr, tvm::runtime::String), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}::operator()(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) const
0: tvm::runtime::TVMMovableArgValueWithContext_::operator tvm::RelayExpr<tvm::RelayExpr>() const
3: _ZN3tvm7runtime13PackedFun
2: tvm::runtime::TypedPackedFunc<tvm::RelayExpr (tvm::RelayExpr, tvm::RelayExpr, tvm::RelayExpr, tvm::runtime::String)>::AssignTypedLambda<tvm::RelayExpr (*)(tvm::RelayExpr, tvm::RelayExpr, tvm::RelayExpr, tvm::runtime::String)>(tvm::RelayExpr (*)(tvm::RelayExpr, tvm::RelayExpr, tvm::RelayExpr, tvm::runtime::String), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}::operator()(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) const
1: tvm::runtime::TVMMovableArgValueWithContext_::operator tvm::RelayExpr<tvm::RelayExpr>() const
0: tvm::RelayExpr tvm::runtime::TVMPODValue_::AsObjectRef<tvm::RelayExpr>() const
File "/cpfs01/user/zhangyuchang/projects/tvm/include/tvm/runtime/packed_func.h", line 779
TVMError: In function relay.op._make.scatter_nd(0: RelayExpr, 1: RelayExpr, 2: RelayExpr, 3: runtime.String) -> RelayExpr: error while converting argument 2: [11:30:33] /cpfs01/user/zhangyuchang/projects/tvm/include/tvm/runtime/packed_func.h:1977: InternalError: Check failed: type_code_ == kTVMObjectHandle (2 vs. 8) : expected Object but got float
what should I do?