Skip to content
This repository was archived by the owner on May 28, 2019. It is now read-only.
This repository was archived by the owner on May 28, 2019. It is now read-only.

invalid combination of arguments error in training or generating #5

Closed

Description

@jinserk

Once I've installed and tried to train or generate as described in the readme, it makes an invalid combination of arguments error as following:

$ python train.py --expName vctk --data data/vctk --noise 4 --seq-len 100 --epochs 90
INFO - 09/06/17 09:30:25 - 0:00:00 - Namespace(K=10, attention_alignment=0.05, batch_size=64, checkpoint='', clip_grad=0.5, data='data/vctk', epochs=90, expName='checkpoints/vctk', gpu=0, hidden_size=256, ignore_grad=10000.0, lr=0.0001, max_seq_len=1000, mem_size=20, noise=4, nspk=22, output_size=63, seed=1, seq_len=100, vocabulary_size=44)
INFO - 09/06/17 09:30:25 - 0:00:00 - Building dataset.
INFO - 09/06/17 09:30:25 - 0:00:00 - Dataset ready!
Traceback (most recent call last):
  File "train.py", line 207, in <module>
    main()
  File "train.py", line 175, in main
    model = Loop(args)
  File "/d2/jbaik/loop/model.py", line 217, in __init__
    self.decoder = Decoder(opt)
  File "/d2/jbaik/loop/model.py", line 137, in __init__
    opt.attention_alignment)
  File "/d2/jbaik/loop/model.py", line 87, in __init__
    self.N_a = getLinear(mem_elem, 3*K)
  File "/d2/jbaik/loop/model.py", line 15, in getLinear
    return nn.Sequential(nn.Linear(dim_in, dim_in/10),
  File "/home/jbaik/.pyenv/versions/3.6.2/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 41, in __init__
    self.weight = Parameter(torch.Tensor(out_features, in_features))
TypeError: torch.FloatTensor constructor received an invalid combination of arguments - got (float, int), but expected one of:
 * no arguments
 * (int ...)
      didn't match because some of the arguments have invalid types: (float, int)
 * (torch.FloatTensor viewed_tensor)
 * (torch.Size size)
 * (torch.FloatStorage data)
 * (Sequence data)

Could you let me get some hint to handle this? Thanks!

Activity

  1. adampolyak commented on Sep 6, 2017

    @adampolyak
    Contributor

    Can you try to execute the code using Python2.7? Currently, the code doesn't support Python3.6.

  2. jinserk commented on Sep 6, 2017

    @jinserk
    Author

    Thanks @adampolyak. Yes, it works with Python 2.7 and PyTorch 0.1.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions