Comments (3)
The issue was due to the float value returned from line 50 in torchvision/models/segmentation/segmentation.py. I converted it into integer and reinstalled the torchvision 0.3.0 library and everything worked well until testing.
from pytorch-segmentation.
Hi @bhusalsantosh , try using the v0.3.0
branch of my torchvision fork here: https://github.com/dusty-nv/vision/commits/v0.3.0
It contains some patches that make the FCN_ResNet ONNX models able to be exported to TensorRT.
from pytorch-segmentation.
@dusty-nv . Thanks for getting back to me. I did the following steps with Torch 1.1.0 and Python3.6
$ sudo pip3 uninstall torchvision
$ python3 -c "import torchvision" # should make error if succesfully uninstalled
$ git clone -bv0.3.0 https://github.com/dusty-nv/vision
$ cd vision
$ sudo python3 setup.py install
as mentioned in (dusty-nv/jetson-inference#370 (comment))
I am getting the following error whenever calling any resnet segmentation model.
`$torchvision.models.segmentation.fcn_resnet18(num_classes=21, pretrained=False, export_onnx=True)
torchvision.models.segmentation.fcn_resnet18()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/dist-packages/torchvision-0.3.0-py3.6-linux-aarch64.egg/torchvision/models/segmentation/segmentation.py", line 70, in fcn_resnet18
File "/usr/local/lib/python3.6/dist-packages/torchvision-0.3.0-py3.6-linux-aarch64.egg/torchvision/models/segmentation/segmentation.py", line 50, in _segm_resnet
File "/usr/local/lib/python3.6/dist-packages/torchvision-0.3.0-py3.6-linux-aarch64.egg/torchvision/models/segmentation/fcn.py", line 29, in init
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/conv.py", line 327, in init
False, _pair(0), groups, bias, padding_mode)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/conv.py", line 40, in init
out_channels, in_channels // groups, *kernel_size))
TypeError: new() received an invalid combination of arguments - got (float, float, int, int), but expected one of:
- (torch.device device)
- (torch.Storage storage)
- (Tensor other)
- (tuple of ints size, torch.device device)
- (object data, torch.device device)`
How do I get over this issue?
from pytorch-segmentation.
Related Issues (8)
- PyTorch Version HOT 1
- Quick tutorial for custom datasets? HOT 4
- Does this repository still require the torchvision 0.3.0 branch at dusty-nv/vision HOT 1
- Dataset folder format for PASACAL VOC dataset HOT 1
- How to load and test the pre-trained segmentation models on system using python script? HOT 1
- Why limitation to 21 classes
- Training SegNet Deep Scene on personal dataset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-segmentation.