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: "sum_cuda" not implemented for 'Bool' #2

Closed
yuanzhiroc opened this issue Nov 19, 2019 · 1 comment
Closed

RuntimeError: "sum_cuda" not implemented for 'Bool' #2

yuanzhiroc opened this issue Nov 19, 2019 · 1 comment

Comments

@yuanzhiroc
Copy link

yuanzhiroc commented Nov 19, 2019

ubuntu@f6b86bb5112d:~/GNNs-for-NLP$ python pytorch_gcn.py
2019-11-19 11:50:03,447 - [INFO] - {'data': 'cora', 'gpu': '0', 'name': 'test_19_11_2019_11:50:03', 'lr': 0.01, 'max_epochs':200, 'l2': 0.0005, 'seed': 1234, 'opt': 'adam', 'gcn_dim': 16, 'dropout': 0.5, 'restore': False, 'log_dir': './log/', 'config_dir': './config/', 'model_dir': './models/', 'save_dir': './models//test_19_11_2019_11:50:03'}
{'config_dir': './config/',
 'data': 'cora',
 'dropout': 0.5,
 'gcn_dim': 16,
 'gpu': '0',
 'l2': 0.0005,
 'log_dir': './log/',
 'lr': 0.01,
 'max_epochs': 200,
 'model_dir': './models/',
 'name': 'test_19_11_2019_11:50:03',
 'opt': 'adam',
 'restore': False,
 'save_dir': './models//test_19_11_2019_11:50:03',
 'seed': 1234}
loading data
Traceback (most recent call last):
  File "pytorch_gcn.py", line 248, in <module>
    model.fit()
  File "pytorch_gcn.py", line 208, in fit
    train_loss = self.run_epoch(epoch)
  File "pytorch_gcn.py", line 175, in run_epoch
    train_acc   = self.get_acc(logits[self.data.train_mask], self.data.y, self.data.train_mask)
  File "pytorch_gcn.py", line 122, in get_acc
    return y_pred.eq(y_actual[mask]).sum().item() / mask.sum().item()
RuntimeError: "sum_cuda" not implemented for 'Bool'

python3.6
pytorch1.1
Is the pytorch version lower?

@svjan5
Copy link
Owner

svjan5 commented Nov 19, 2019

Hi @yuanzhiroc,
On the shared colab the given code works. Seems like the pytorch-geometric library is not installed properly in your case.

@svjan5 svjan5 closed this as completed Dec 2, 2019
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

2 participants