ranahanocka / MeshCNN

Convolutional Neural Network for 3D meshes in PyTorch
MIT License
1.56k stars 314 forks source link

how to run on cpu enviroment #32

Closed peichenzhong closed 4 years ago

peichenzhong commented 4 years ago

bash ./scripts/shrec/train.sh THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1549630534704/work/torch/csrc/cuda/Module.cpp line=34 error=35 : CUDA driver version is insufficient for CUDA runtime version Traceback (most recent call last): File "train.py", line 9, in opt = TrainOptions().parse() File "/home/peichen/python_test/MeshCNN/options/base_options.py", line 54, in parse torch.cuda.set_device(self.opt.gpu_ids[0]) File "/home/peichen/anaconda3/envs/meshcnn/lib/python3.6/site-packages/torch/cuda/init.py", line 264, in set_device torch._C._cuda_setDevice(device) RuntimeError: cuda runtime error (35) : CUDA driver version is insufficient for CUDA runtime version at /opt/conda/conda-bld/pytorch_1549630534704/work/torch/csrc/cuda/Module.cpp:34

ankitpatnala commented 4 years ago

add an argument --gpu_ids -1/

peichenzhong commented 4 years ago

and python test.py --gpu_ids -1 --dataroot datasets Running Test loaded mean / std from cache Traceback (most recent call last): File "test.py", line 25, in run_test() File "test.py", line 12, in run_test model = create_model(opt) File "/home/peichen/python_test/MeshCNN/models/init.py", line 3, in create_model model = ClassifierModel(opt) File "/home/peichen/python_test/MeshCNN/models/mesh_classifier.py", line 33, in init self.gpu_ids, opt.arch, opt.init_type, opt.init_gain) File "/home/peichen/python_test/MeshCNN/models/networks.py", line 102, in define_classifier opt.resblocks) File "/home/peichen/python_test/MeshCNN/models/networks.py", line 132, in init norm_args = get_norm_args(norm_layer, self.k[1:]) File "/home/peichen/python_test/MeshCNN/models/networks.py", line 38, in get_norm_args raise NotImplementedError('normalization layer [%s] is not found' % norm_layer.func.name) NotImplementedError: normalization layer [BatchNorm2d] is not found

how to deal with it ??thank

peichenzhong commented 4 years ago

torch_mask = torch.from_numpy(edgesmask.copy()) TypeError: can't convert np.ndarray of type numpy.bool. The only supported types are: double, float, float16, int64, int32, and uint8.

ankitpatnala commented 4 years ago

you can convert the type to uint8 I had the same issue as i created the environment from the repo's environment.yml file which has pytorch 1.0 but the current code's dependency is pytorch 1.2.0. So the author recommended me to use the old checkout of this branch which somehow works.

peichenzhong commented 4 years ago

so i should updata my pytorch into 1.2.0 ??? i have a try

ankitpatnala commented 4 years ago

i dont know the author suggested me to use the old checkout

please follow this link: https://github.com/ranahanocka/MeshCNN/issues/30#issuecomment-541486859

but author has changed the environment file in her latest commit which was 6 hours ago. May be you can update your branch and rerun the scripts.

peichenzhong commented 4 years ago

thank , this project is running ,but i have a problem how to watch the layer or models on the tensorboardx???

peichenzhong commented 4 years ago

i want to watch the graph ,what should i do

ankitpatnala commented 4 years ago

I never used tensorboard but you can find it's documentation .you can save the checkpoints on a file and try to open the tensboard logdir on other terminal upon which it will give you a local host IP which you can run in your browser. Before that install tensorboard packages as it is not present in the environment.yml file

peichenzhong commented 4 years ago

i hava some problem that how could i compute the input edge feature which is a 5-dimensional vector every edge??? Anyway , i am confused about the edges value.

peichenzhong commented 4 years ago

i hava some problem that how could i compute the input edge feature which is a 5-dimensional vector every edge??? Anyway , i am confused about the edges value.

ranahanocka commented 4 years ago

hi @peichenzhong ,

i hava some problem that how could i compute the input edge feature which is a 5-dimensional vector every edge??? Anyway , i am confused about the edges value.

I don't understand your question. Please go through the examples in this Github and follow the instructions in the README, I think it will clarify most of your problems. Also, you can read through the Github Issues, which might also answer some questions.

Thanks & Good luck! -Rana