Thanks!
I try to fix it by
```
def _tensortonum():
def _impl(inputs, input_types):
return inputs[0]
return _impl
```
Another error accurs:
```
TypeError: int() argument must be a string, a bytes-like object or a number,
not 'Call'
```
```
'58', %58 : Scalar = prim::ImplicitTensorToNum(%57),
......
'position_ids.1', %position_ids.1 : Long(7) = aten::arange(%59, %58, %60, %61,
%62, %63, %64)
```
'aten::arange' will _create_typed_const(inputs[1], dtype), but 'inputs[1]' is
'Call', that's the reason of ‘TypeError’ mentioned above.
So I use the following implementation.
```
def _tensortonum():
def _impl(inputs, input_types):
tmp = _infer_value(inputs[0], None)
return np.array(tmp).astype(np.str)
return _impl
```
It works, but I'm not sure if it is correct because when it goes to
'aten::view', the following error accurs:
```
TVMError: Check failed: ObjectTypeChecker<TObjectRef>: :Check(ptr): Expect
List[IntImm] but get Array
```
It seems like something is wrong when it goes to:
_op.transform.reshape(data, new_shape)
---
[Visit
Topic](https://discuss.tvm.ai/t/problems-when-import-bert-model-from-pytorch-relay/6659/4)
to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click
here](https://discuss.tvm.ai/email/unsubscribe/5e97c539f2e2123932bb180be030e977e3249af9f63d609f9dbb1b91cd97244c).