Open anorthman opened 5 years ago
Hi @anorthman, please downgrade PyTorch 1.0 to 0.4.0 to have a try. Thanks!
I had the same problem,when I downgrade PyTorch 1.0 to 0.4.0 , ImportError: No module named 'MainModel'
@huanyuan54, please refer to this.
Platform (like ubuntu 16.04/win10):14.04
Python version:3.6
Source framework with version (like Tensorflow 1.4.1 with GPU):torch1.0
Destination framework with version (like CNTK 2.3 with GPU):
Pre-trained model path (webpath or webdisk path):
Running scripts: mmtoir -f pytorch -d resnet101 --inputShape 3,224,224 -n imagenet_resnet101.pth Error: %input.203 : Float(1, 2048, 7, 7) = aten::_convolution(%3902, %619, %3903, %3906, %3909, %3912, %3913, %3916, %3917, %3918, %3919, %3920), scope: ResNet/Sequential[layer4]/Bottleneck[2]/Conv2d[conv3] %3922 : bool = prim::Constant[value=0](), scope: ResNet/Sequential[layer4]/Bottleneck[2]/BatchNorm2d[bn3] %3923 : float = prim::Constant[value=0.1](), scope: ResNet/Sequential[layer4]/Bottleneck[2]/BatchNorm2d[bn3] %3924 : float = prim::Constant[value=1e-05](), scope: ResNet/Sequential[layer4]/Bottleneck[2]/BatchNorm2d[bn3] %3925 : bool = prim::Constant[value=1](), scope: ResNet/Sequential[layer4]/Bottleneck[2]/BatchNorm2d[bn3] %3926 : Float(1, 2048, 7, 7) = aten::batchnorm(%input.203, %620, %621, %622, %623, %3922, %3923, %3924, %3925), scope: ResNet/Sequential[layer4]/Bottleneck[2]/BatchNorm2d[bn3] %3927 : int = prim::Constant[value=1](), scope: ResNet/Sequential[layer4]/Bottleneck[2] %input.204 : Float(1, 2048, 7, 7) = aten::add(%3926, %3852, %3927), scope: ResNet/Sequential[layer4]/Bottleneck[2] %input.205 : Float(1, 2048, 7, 7) = aten::relu_(%input.204), scope: ResNet/Sequential[layer4]/Bottleneck[2]/ReLU[relu] %3942 : int = prim::Constant[value=1](), scope: ResNet/AdaptiveAvgPool2d[avgpool] %3943 : int = prim::Constant[value=1](), scope: ResNet/AdaptiveAvgPool2d[avgpool] %3944 : int[] = prim::ListConstruct(%3942, %3943), scope: ResNet/AdaptiveAvgPool2d[avgpool] %3945 : Float(1, 2048, 1, 1) = aten::adaptive_avg_pool2d(%input.205, %3944), scope: ResNet/AdaptiveAvgPool2d[avgpool] %3946 : int = prim::Constant[value=0](), scope: ResNet %3947 : int = aten::size(%3945, %3946), scope: ResNet %3950 : int = prim::Constant[value=-1](), scope: ResNet %3951 : int[] = prim::ListConstruct(%3947, %3950), scope: ResNet %input : Float(1, 2048) = aten::reshape(%3945, %3951), scope: ResNet %3953 : Float(2048!, 1000!) = aten::t(%625), scope: ResNet/Linear[fc] %3954 : int = prim::Constant[value=1](), scope: ResNet/Linear[fc] %3955 : int = prim::Constant[value=1](), scope: ResNet/Linear[fc] %3956 : Float(1, 1000) = aten::addmm(%626, %input, %3953, %3954, %3955), scope: ResNet/Linear[fc] return (%3956) , False