Comments (5)
Just figured out, this was no issue with the chamferDist implementation but with the way @Colin97 is testing. From that code, x
and y
remain in cpu. According to the documentation, .cuda()
returns a copy of the tensor in the gpu unless the tensor is already in it, so the right way to do would be to write:
x = x.cuda()
y = y.cuda()
dis1, dis2 = distChamfer(x, y)
So, just make sure your tensors are in the GPU before passing to chamferDist and it should work.
from atlasnet.
Hi @Colin97 ,
can you also specify your python version please ?
The fastest solution is to try other combinations : Python 3.7 - cuda 10 - pytorch 1 is my setup. Other people in my lab use Python 3.6 - cuda 10 - pytorch 1.
If none of the above work for you, can you paste your error ?
best regards,
Thibault
from atlasnet.
I am having the same error. Python 3.6, cuda 10.0, pytorch 1.
THCudaCheck FAIL file=/pytorch/aten/src/THC/THCCachingHostAllocator.cpp line=265 error=77 : an illegal memory access was encountered
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/torch/tensor.py", line 66, in __repr__
return torch._tensor_str._str(self)
File "/usr/local/lib/python3.6/dist-packages/torch/_tensor_str.py", line 277, in _str
tensor_str = _tensor_str(self, indent)
File "/usr/local/lib/python3.6/dist-packages/torch/_tensor_str.py", line 195, in _tensor_str
formatter = _Formatter(get_summarized_data(self) if summarize else self)
File "/usr/local/lib/python3.6/dist-packages/torch/_tensor_str.py", line 228, in get_summarized_data
return torch.stack([get_summarized_data(x) for x in (start + end)])
File "/usr/local/lib/python3.6/dist-packages/torch/_tensor_str.py", line 228, in <listcomp>
return torch.stack([get_summarized_data(x) for x in (start + end)])
File "/usr/local/lib/python3.6/dist-packages/torch/_tensor_str.py", line 221, in get_summarized_data
return torch.cat((self[:PRINT_OPTS.edgeitems], self[-PRINT_OPTS.edgeitems:]))
RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at /pytorch/aten/src/THC/THCCachingHostAllocator.cpp:26
from atlasnet.
Just figured out, this was no issue with the chamferDist implementation but with the way @Colin97 is testing. From that code,
x
andy
remain in cpu. According to the documentation,.cuda()
returns a copy of the tensor in the gpu unless the tensor is already in it, so the right way to do would be to write:x = x.cuda() y = y.cuda() dis1, dis2 = distChamfer(x, y)
So, just make sure your tensors are in the GPU before passing to chamferDist and it should work.
u r right!
from atlasnet.
Thanks @matheusgadelha !
--Thibault
from atlasnet.
Related Issues (20)
- (Meshlab Visualization Trick ) Parts of faces flipped in the generated obj by train.py --demo HOT 1
- V2.2 dataset links are invalid (not the ones from V1) HOT 2
- some data download questions HOT 8
- Strangley poor results on pre-trained model HOT 6
- the pretrained resenet model under shapenet HOT 2
- Question about data HOT 2
- AtlasNet checkpoint not available HOT 5
- Question about train and test strategy HOT 2
- pymesh library HOT 1
- Compile Metro Distance (GPL3 Licence) HOT 1
- Question About Visulization HOT 2
- Weird results using pre-trained model HOT 1
- Question about running HOT 2
- Unable to find normalised mesh dataset in AtlasNetv2 HOT 3
- Mesh Parametrization Checkerboard Visualization HOT 4
- test HOT 3
- Learning representations for pointcloud manifold
- Cannot Load autoencoder_25_squares & Poor Performance on Pre-trained Model HOT 1
- AttributeError: module 'torch._C' has no attribute '_cuda_setDevice' HOT 4
- Error for final report generation.
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 atlasnet.