Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in running your code. #1

Open
sentientmachine opened this issue Oct 16, 2018 · 1 comment
Open

Error in running your code. #1

sentientmachine opened this issue Oct 16, 2018 · 1 comment

Comments

@sentientmachine
Copy link

sentientmachine commented Oct 16, 2018

Here's what I did:

get virtualenv as root: emerge -avNu virtualenv
cd /home/el/code/python/100_liam_wilson_comp_vision_room_analyzer/pytorch.room.layout
virtualenv .env
source .env/bin/activate
#you've left me to guessing and checking versions at this point so lets use most up to date ones.
pip install opencv-python
pip install Pillow
pip install torch
pip install torchvision

We're off to the races, so I tried:

python segment_st.py train -d datasets/sunrgbd/ -c 37 -s 480 --arch drn_d_105 --batch-size 32 --random-scale 1.75 --random-rotate 15 --epochs 100 --lr 0.01 --momentum 0.9 --lr-mode poly

and I'm getting:

THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=74 error=35 : CUDA driver version is insufficient for CUDA runtime version
Traceback (most recent call last):
  File "segment_st.py", line 785, in <module>
    main()
  File "segment_st.py", line 779, in main
    train_seg(args)
  File "segment_st.py", line 391, in train_seg
    model = torch.nn.DataParallel(single_model).cuda()
  File "/home/el/code/python/100_liam_wilson_comp_vision_room_analyzer/pytorch.room.layout/.env/lib/python2.7/site-packages/torch/nn/modules/module.py", line 258, in cuda
    return self._apply(lambda t: t.cuda(device))
  File "/home/el/code/python/100_liam_wilson_comp_vision_room_analyzer/pytorch.room.layout/.env/lib/python2.7/site-packages/torch/nn/modules/module.py", line 185, in _apply

Very likely due to versioning conflicts from my having to guess the layout of your non standard packages, so therefore the solution is for you to show us what versions of all non standard packages you are using, since they are very brittle and the latest packages break your torch specific code. The OpenCV2 seems to indicate you're using python2, yet the parameter iteration you're using seems to be only compatible with python3.

What operating system are you using, what version of python interpreter are you using, and what legacy versions of cv2, pillow, torch and torchvision are you using? Without this info all we can do is get blasted in the face with syntax errors playing guess and check.

Edit: ok lel, you're using Python 3.5 which has syntax incompatible with python 3.4 and python 2.7. Not sure if topkek or NPC wojack. Carry on.

@liamw96
Copy link
Owner

liamw96 commented Oct 16, 2018

Hi there,

Actually most codes are borrowed from https://github.com/fyu/drn, which uses python3.

Specifically, I am using

python 3.6.6
torch 0.4.1
gcc 7.2.0
PIL 5.2.0
64-bit ubuntu 16.04.5
cv2 3.1.0
torchvision 0.2.1
linux kernel 4.4.0-103-generic

As for opencv, I am not sure ... but it seems that there is no cv3 according to http://answers.opencv.org/question/63405/why-do-python-bindings-for-v3-still-use-package-name-cv2/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants