shobrook / sequitur

Library of autoencoders for sequential data
MIT License
410 stars 56 forks source link

Demo not working #3

Closed pierreyvesm closed 3 years ago

pierreyvesm commented 3 years ago

HI, so just to let you know, trying the dome does not seams to work out


AttributeError Traceback (most recent call last)

in 8 torch.tensor([9, 10, 11, 12]) 9 ] ---> 10 encoder, decoder, _, _ = quick_train(LINEAR_AE, train_seqs, encoding_dim=2, denoise=True) 11 12 encoder(torch.tensor([13, 14, 15, 16])) # => torch.tensor([0.19, 0.84]) ~/.local/lib/python3.6/site-packages/sequitur/quick_train.py in quick_train(model, train_set, encoding_dim, verbose, lr, epochs, denoise, **kwargs) 80 epochs=50, denoise=False, **kwargs): 81 model = instantiate_model(model, train_set, encoding_dim, **kwargs) ---> 82 losses = train_model(model, train_set, verbose, lr, epochs, denoise) 83 encodings = get_encodings(model, train_set) 84 ~/.local/lib/python3.6/site-packages/sequitur/quick_train.py in train_model(model, train_set, verbose, lr, epochs, denoise) 30 # device = torch.device("cuda" if torch.cuda.is_available() else "cpu") 31 # model.to(device) ---> 32 optimizer = torch.optim.Adam(model.parameters(), lr=lr) 33 criterion = MSELoss(size_average=False) 34 AttributeError: 'NoneType' object has no attribute 'parameters'
gsimmskutta commented 3 years ago

Same error here, MacOs Catalina, anaconda python 3.8.6. Installed sequitur 1.2.3 with pip.

shobrook commented 3 years ago

Sorry about this! It seems I forgot to upload the latest version of sequitur to PyPi, which includes a fix for this. Go ahead and upgrade to the latest version on PyPi (1.2.4). I've also updated the example on the README to reflect the new changes.