Open ChristianMilianti opened 1 year ago
Running into the same problem. Is there a work around for this? Also isn't pytorch v1.0.0 very old??
Hey @apotdar2023, I've "sort of" got it to work, see below.
I modified the environment.yaml
file, and removed the - pytorch=1.0.0
& - torchvision=0.2.1
requirements.
I then created and activated the enviornment
conda env create -f environment.yaml
conda activate mesh_funcspace
Then I installed CUDA Toolkit 10.0 (only installed CUDA Toolkit, not the driver) for my system (Ubuntu 18.04) via the runfile.
Then updated my path variables so CUDA could be found.
export PATH=/usr/local/cuda-10.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH
pip install torch-1.0.0-cp36-cp36m-linux_x86_64.whl
pip install torchvision-0.2.0-py2.py3-none-any.whl
After I did the above I tried running python setup.py build_ext --inplace
, but encountered the same error as https://github.com/autonomousvision/occupancy_networks/pull/105 , editing setup.py as per https://github.com/autonomousvision/occupancy_networks/pull/105/commits/9dd0daad55f7e43aefbf189b6ab1801a20ebf6da fixed the issue for me.
I installed Meshlab to view the .off files but I couldn't see them for some reason??
Downloaded the preprocessed data (took ~ 8 hours to download)
Tried running the generate.py script after the preprocessed data was downloaded but encountered some issues. Was able to eventually get python generate.py configs/unconditional/onet_cars_pretrained.yaml
working by forcing generate.py
to use CPU by adding device = "cpu"
after line 31 in generate.py
. Took about 20 min or so to run for me (not sure if this is typical?).
I was then able to visualise the results with meshlab.
Other: The error I'm getting when running generate.py with CUDA is the following
File "generate.py", line 164, in <module>
out = generator.generate_mesh(data)
File "/home/christian/Documents/GitHub/occupancy_networks/im2mesh/onet/generation.py", line 81, in generate_mesh
mesh = self.generate_from_latent(z, c, stats_dict=stats_dict, **kwargs)
File "/home/christian/Documents/GitHub/occupancy_networks/im2mesh/onet/generation.py", line 124, in generate_from_latent
pointsf, z, c, **kwargs).cpu().numpy()
File "/home/christian/Documents/GitHub/occupancy_networks/im2mesh/onet/generation.py", line 151, in eval_points
occ_hat = self.model.decode(pi, z, c, **kwargs).logits
File "/home/christian/Documents/GitHub/occupancy_networks/im2mesh/onet/models/__init__.py", line 110, in decode
logits = self.decoder(p, z, c, **kwargs)
File "/home/christian/miniconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/home/christian/Documents/GitHub/occupancy_networks/im2mesh/onet/models/decoder.py", line 55, in forward
net = self.fc_p(p)
File "/home/christian/miniconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/home/christian/miniconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 67, in forward
return F.linear(input, self.weight, self.bias)
File "/home/christian/miniconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torch/nn/functional.py", line 1354, in linear
output = input.matmul(weight.t())
RuntimeError: cublas runtime error : the GPU program failed to execute at /pytorch/aten/src/THC/THCBlas.cu:258
I tried solving by running conda install mkl -c anaconda
as per https://github.com/autonomousvision/occupancy_networks/issues/100 but that didn't seem to fix the issue.
I believe there could be an issue due to me using a 30 series GPU and CUDA toolkit 10?
If you or anyone else are able to get this working, please let me know how! Any help would be greatly appreciated. :)
I had the same problem. My.off file is empty.
Hi!
When I run
conda env create -f environment.yaml
I get the following error:Does anyone know of a workaround? Do any newer versions of pytorch work?
Other info: I've tried it on 2 different computers with 2 different OS (Ubuntu 18.04, and 20.04) and have received the same issue. I'm using miniconda.
Thanks!