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: expected scalar type Long but found Float #238

Open
lyhsieh opened this issue Dec 27, 2022 · 0 comments
Open

RuntimeError: expected scalar type Long but found Float #238

lyhsieh opened this issue Dec 27, 2022 · 0 comments

Comments

@lyhsieh
Copy link

lyhsieh commented Dec 27, 2022

I ran examples/hello-world.py and ended up with RuntimeError: expected scalar type Long but found Float.
My environment: pytorch=1.13.1, cudatoolkit=10.0.130, gcc/g++=7.5.0.
Here is the complete log. How can I fix it?

(base) root@efbc464e2a2e:/~/SparseConvNet# python examples/hello-world.py 
wandb: (1) Create a W&B account
wandb: (2) Use an existing W&B account
wandb: (3) Don't visualize my results
wandb: Enter your choice: 3
wandb: You chose 'Don't visualize my results'
wandb: Tracking run with wandb version 0.13.7
wandb: W&B syncing is set to `offline` in this directory.  
wandb: Run `wandb online` or set WANDB_MODE=online to enable cloud syncing.
Traceback (most recent call last):
  File "examples/hello-world.py", line 69, in <module>
    output = model(input)
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/container.py", line 204, in forward
    input = module(input)
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/container.py", line 204, in forward
    input = module(input)
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/sparseconvnet-0.2-py3.7-linux-x86_64.egg/sparseconvnet/maxPooling.py", line 94, in forward
    self.nFeaturesToDrop)
  File "/opt/conda/lib/python3.7/site-packages/sparseconvnet-0.2-py3.7-linux-x86_64.egg/sparseconvnet/maxPooling.py", line 38, in forward
    nFeaturesToDrop)
RuntimeError: expected scalar type Long but found Float
wandb: Waiting for W&B process to finish... (failed 1).
wandb: You can sync this run to the cloud by running:
wandb: wandb sync /~/SparseConvNet/wandb/offline-run-20221227_173643-737ky2id
wandb: Find logs at: ./wandb/offline-run-20221227_173643-737ky2id/logs
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

1 participant