neural-polysynthetic-language-modelling / iiksiin

Deterministically constructs a sequence of morpheme tensors from a word using Tensor Product Representation
Mozilla Public License 2.0
10 stars 1 forks source link

No cuda doesn't work #7

Open ftyers opened 5 years ago

ftyers commented 5 years ago
$ 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 commented 4 years ago

Fix here: https://github.com/neural-polysynthetic-language-modelling/iiksiin/pull/8