jonkhler / s2cnn

Spherical CNNs
MIT License
939 stars 176 forks source link

Error running example #60

Closed DavidHribek closed 2 years ago

DavidHribek commented 2 years ago

Hello,

I am trying to run mnist example, but i am getting many errors running script /examples/mnist/run.py. Seems like i have wrong version of some packages but cant figure out which versions are needed. Fixing one error leads to another error..

Some errors: x = torch.fft(torch.stack((x, torch.zeros_like(x)), dim=-1), 2) TypeError: 'module' object is not callable

RuntimeError: view_as_complex is only supported for half, float and double tensors, but got a tensor of scalar type: ComplexFloat

I have installed all the dependencies:

conda create --name cuda9 python=3.6 
conda activate cuda9

# s2cnn deps
#conda install pytorch torchvision cuda90 -c pytorch # get correct command line at http://pytorch.org/
conda install -c anaconda cupy  
pip install pynvrtc joblib

# lie_learn deps
conda install -c anaconda cython  
conda install -c anaconda requests  

# shrec17 example dep
conda install -c anaconda scipy  
conda install -c conda-forge rtree shapely  
conda install -c conda-forge pyembree  
pip install "trimesh[easy]"  

python setup.py install

Any help? Thanks.

Fenyutanchan commented 2 years ago

Hello, @DavidHribek

I think this problem is fixed by the newest commit of ab03b04794b25f54c9cdd0fc4022b1a1d0e21cde.

DavidHribek commented 2 years ago

Thank you. After changing a few lines, the code works for gpu.

mariogeiger commented 2 years ago

@DavidHribek would you agree to make a PR with the changes you did?

DavidHribek commented 2 years ago

@mariogeiger I have created the PR. It is just one line that fixed the error.