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

No cuda doesn't work #7

Open
ftyers opened this issue Aug 1, 2019 · 1 comment
Open

No cuda doesn't work #7

ftyers opened this issue Aug 1, 2019 · 1 comment

Comments

@ftyers
Copy link
Contributor

ftyers commented Aug 1, 2019

$ python3 ./autoencoder.py --mode train --tensor_file guarani.tensors --output_file guarani.trained_model --batch_size 100 --epochs 200 --hidden_layer_size 200 --learning_rate 0.01 --hidden_layers 1 --cuda_device -1
2019-08-02 00:42:48	Training autoencoder using tensors in guarani.tensors as training data
Traceback (most recent call last):
  File "./autoencoder.py", line 602, in <module>
    main()
  File "./autoencoder.py", line 432, in main
    f"cuda:{args.cuda_device}"
  File "/home/fran/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 376, in to
    device, dtype, non_blocking = torch._C._nn._parse_to(*args, **kwargs)
RuntimeError: Device index must be non-negative, got -1

But:

  --cuda_device CUDA_DEVICE
                        Number specifying which cuda device should be used. A
                        negative number means run on CPU.
@OneAdder
Copy link
Contributor

Fix here: #8

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