Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError:_th_diag not supported on CUDAType for Bool #11

Open
yxbu opened this issue Nov 20, 2019 · 5 comments
Open

RuntimeError:_th_diag not supported on CUDAType for Bool #11

yxbu opened this issue Nov 20, 2019 · 5 comments

Comments

@yxbu
Copy link

yxbu commented Nov 20, 2019

I get a runtime error when I run demo.py. the version of my Pytorch is 1.2.0.what's the problem?
1747
371

Epoch: 1
0it [00:00, ?it/s]Traceback (most recent call last):
File "demo.py", line 133, in
train_loss, train_acc = train(epoch)
File "demo.py", line 73, in train
loss.backward()
File "/home/yxbu/.conda/envs/torch/lib/python3.7/site-packages/torch/tensor.py", line 118, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/yxbu/.conda/envs/torch/lib/python3.7/site-packages/torch/autograd/init.py", line 93, in backward
allow_unreachable=True) # allow_unreachable flag
File "/home/yxbu/.conda/envs/torch/lib/python3.7/site-packages/torch/autograd/function.py", line 77, in apply
return self._forward_cls.backward(self, *args)
File "/home/yxbu/code/spdnet/spdnet/spd.py", line 296, in backward
Q = max_mask.diag().float()
RuntimeError: _th_diag not supported on CUDAType for Bool
0it [00:00, ?it/s]

@adavoudi
Copy link
Owner

Hi,
It may be due to version changes. I have no problem with PyTorch 1.1.0.

@henanjun
Copy link

henanjun commented Apr 5, 2020

It is possible to solve the problem without degrade the pytorch?

@adavoudi
Copy link
Owner

adavoudi commented Apr 6, 2020

Yes, but unfortunately I am currently so busy. If you can send a PR it is really appreciated.

@henanjun
Copy link

henanjun commented Apr 6, 2020

Yes, but unfortunately I am currently so busy. If you can send a PR it is really appreciated.

Thanks for your kind reply. I have solved the problem by replace the "Q = max_mask.diag().float()" with "Q = max_mask.float().diag()."

adavoudi added a commit that referenced this issue May 3, 2020
Apparently a version change bug!
@dddc-1
Copy link

dddc-1 commented Apr 15, 2024

Hello, the link to download the data set cannot be opened. Is there any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants