-
Notifications
You must be signed in to change notification settings - Fork 60
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: result type Long can't be cast to the desired output type Bool #16
Comments
Hi there! I still stock in this step. Would you please help me? I really need to figure this out. |
I stock in this step too |
I stock in this step too. |
This may be caused by Python and python versions. You can modify the data type of the corresponding tensor according to the error message. |
I'm not sure It works (I can not run the code. because of GPU problems) change line 114 to & (labels_gt[center_idx] > 0)).long() #adding parenthesis |
I meet this error too ,and I have solved it ! you should confirm that your environment is as same as the required version,install the right versions pkg ,then the error is solved. |
I modify the code as follows, then it can run: |
where is this code? |
Hello there!
I am trying to train this model by running this code: !sh train_CTW1500.sh in google Colab:
but I get this error in my zero epoch:
load the vgg16 weight from ./cache
Start training TextGraph.
Epoch: 0 : LR = [0.001]
Traceback (most recent call last):
File "train_TextGraph.py", line 236, in
main()
File "train_TextGraph.py", line 217, in main
train(model, train_loader, criterion, scheduler, optimizer, epoch, logger)
File "train_TextGraph.py", line 74, in train
output, gcn_data = model(img, gt_roi, to_device)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/drive/My Drive/Colab Notebooks/DRRG/network/textnet.py", line 122, in forward
feat_batch, adj_batch, h1id_batch, gtmat_batch = self.graph(graph_feat, roi_data)
File "/content/drive/My Drive/Colab Notebooks/DRRG/layers/gcn_layer.py", line 176, in call
batch_data = self.graph_IPS(feat_bin, labels_bin, hops_bin, one_hops_bin, knn_graph_bin)
File "/content/drive/My Drive/Colab Notebooks/DRRG/layers/gcn_layer.py", line 114, in graph_IPS
& labels_gt[center_idx] > 0).long()
RuntimeError: result type Long can't be cast to the desired output type Bool
Can you help me to resolve this issue please?
The text was updated successfully, but these errors were encountered: