[TVM Discuss] [Questions] Problems when import BERT model from PyTorch Relay

2020-05-15 Thread wwwwcu via TVM Discuss
Sorry I didn't make it clear. The code pasted in the first issue works well after adopting your solution. Then I tested 'gpt2' model, it reported an error: ``` TypeError: int() argument must be a string, a bytes-like object or a number, not ‘Call’ ``` The test code is shown below: ``` from tvm

[TVM Discuss] [Questions] Problems when import BERT model from PyTorch Relay

2020-05-15 Thread Siju via TVM Discuss
> from tvm import relay > import torch > from pytorch_pretrained_bert import BertTokenizer, BertModel, BertForMaskedLM > import logging > > logging.basicConfig(level=logging.INFO) I used the code you pasted in the first issue and its able to generate complete relay function. Im not able to ge

[TVM Discuss] [Questions] Problems when import BERT model from PyTorch Relay

2020-05-15 Thread wwwwcu via TVM Discuss
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::ImplicitTe

[TVM Discuss] [Questions] Problems when import BERT model from PyTorch Relay

2020-05-15 Thread Siju via TVM Discuss
[PR 5603](https://github.com/apache/incubator-tvm/pull/5603) will help to solve the issue of `prim::ImplicitTensorToNum` If you come across issue with matmul, you can merge [PR 5604](https://github.com/apache/incubator-tvm/pull/5604) as well. --- [Visit Topic](https://discuss.tvm.ai/t/pr

[TVM Discuss] [Questions] Problems when import BERT model from PyTorch Relay

2020-05-12 Thread wwwwcu via TVM Discuss
Hi, I was trying to import [bert-base-uncased](https://pypi.org/project/pytorch-pretrained-bert/) by PyTorch relay. It said that "NotImplementedError: The following operators are not implemented: ['prim::ImplicitTensorToNum']" I can't find any useful information about 'ImplicitTensorTo