Hi there,

While I was following the tutorial [relay quick 
start](https://tvm.apache.org/docs/tutorial/relay_quick_start.html), I tried to 
load a module from pytorch but it raises segmentation fault error. The TVM I am 
using the latest commit `bff98843bef9a312587aaff51b679d9b69a7d5a7` and the code 
to reproduce is attached below

```
from tvm import relay
import tvm
import numpy as np

import torch
import torch as th
import torch.nn as nn
from torchvision import models

import torch.onnx 
from tvm import relay, auto_scheduler

model = nn.Sequential(
    nn.Conv2d(3, 3, kernel_size=3, padding=1),
    nn.BatchNorm2d(3),
    # nn.Dropout()
)

input_shape = [1, 3, 224, 224]
input_data = torch.randn(input_shape)
scripted_model = torch.jit.trace(model, input_data).eval()
input_name = "input0"
shape_list = [(input_name, input_data.shape)]
mod, params = relay.frontend.from_pytorch(scripted_model, shape_list)
print(mod['main'])

opt_level = 3
# target = tvm.target.cuda()
target = "llvm"
with tvm.transform.PassContext(opt_level=opt_level):
    lib = relay.build(mod, target=target, params=params)
```





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/relay-failed-to-build-models-exported-from-pytorch/11394/1)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/bf147477f2eac3b264299539391f25aadafee0426a6de59a42beb441de850a9e).

Reply via email to