lmb-freiburg / flownet2-docker

Dockerfile and runscripts for FlowNet 2.0 (estimation of optical flow)
https://lmb.informatik.uni-freiburg.de/Publications/2017/IMKDB17/
GNU General Public License v3.0
158 stars 52 forks source link

cuda error when feeding list of images #7

Closed HTLife closed 6 years ago

HTLife commented 6 years ago

First single image example execute without error. However, when feeding list the following error shows.

$ sudo ./run-network.sh -n FlowNet2-s -g 1 -vv data/flow-first-images.txt data/flow-second-images.txt data/flow-outputs.txt
Using GPU:       1
Running network: FlowNet2-s
Working dir:     /flownet2/flownet2/scripts
First input:     data/flow-first-images.txt
Second input:    data/flow-second-images.txt
Output:          data/flow-outputs.txt
/flownet2/flownet2/scripts
WARNING: Logging before InitGoogleLogging() is written to STDERR
F1107 11:47:48.281453    10 common.cpp:166] Check failed: error == cudaSuccess (10 vs. 0)  invalid device ordinal
*** Check failure stack trace: ***
/bin/bash: line 1:    10 Aborted                 (core dumped) python run-flownet-docker.py --verbose --gpu 1 /flownet2/flownet2/models/FlowNet2-s/FlowNet2-s_weights.caffemodel* /flownet2/flownet2/models/FlowNet2-s/FlowNet2-s_deploy.prototxt.template data/flow-first-images.txt data/flow-second-images.txt data/flow-outputs.txt
nikolausmayer commented 6 years ago

Hi,

the second example also changes the system GPU using -g 1. Your error message Check failed: error == cudaSuccess (10 vs. 0) invalid device ordinal suggests that you do not have multiple GPUs from which to choose, so this does not make much sense in your case.

Simply remove -g 1 from your command, then it should work.

HTLife commented 6 years ago

@nikolausmayer Thanks for your reply. This resolve my problem.