Closed floortje4 closed 6 years ago
Thanks so much for letting me know about this, and I'm sorry it took me so long to address it. I just pushed an update that should fix this particular error, and also avoids importing skipthoughts which should not have been included in the first place. If you make another attempt to run it, let me know.
Just fyi, added skip-troughs master branch and ran the trainer on python 2.7 on ubuntu 17.04 Got an error 'SequenceTransformer instance has no attribute 'filtered_ent_counts'. Did not have time to look into it but it seems the example is not working out of the box. Maybe not enough example data?
python train_generation.py --train_seqs example_stories.csv --save_filepath example_model/
Using Theano backend. loaded transformer with 16 words from example_model//transformer.pkl Created model RNNLM : {'n_timesteps': 15, 'verbose': 1, 'sample_words': None, 'n_pos_nodes': 100, 'n_pos_tags': 59, 'filepath': 'example_model/', 'n_feature_nodes': 100, 'batch_size': 25, 'lr': 0.001, 'n_hidden_nodes': 500, 'decay': 1e-06, 'n_pos_embedding_nodes': 25, 'embeddings': None, 'n_hidden_layers': 2, 'lexicon_size': None, 'clipvalue': 5.0, 'n_embedding_nodes': 300, 'optimizer': 'Adam', 'use_features': False, 'use_pos': False} training epoch 1/10... training RNNLM on 10 sequences with batch size = 25 Saved RNNLM to example_model/ loss: 1.945 (0.543m) generating sequences... created predictor model decoding generated sequences... Traceback (most recent call last): File "train_generation.py", line 73, in
train_model(train_seqs_file=args.train_seqs, model=model, n_epochs=args.n_epochs)
File "train_generation.py", line 41, in train_model
temp=1.0, n_sents_per_seq=1, detokenize=True, adapt_ents=True)
File "/home/a/narrative-prediction-master/models/pipeline.py", line 68, in predict
capitalize_ents=capitalize_ents, adapt_ents=adapt_ents)
File "/home/a/narrative-prediction-master/models/transformer.py", line 557, in decode_num_seqs
seq = adapt_tok_seq_ents(seq, ents=ents[seq_idx], sub_ent_probs=ent_counts_to_probs(self.filtered_ent_counts))
AttributeError: SequenceTransformer instance has no attribute 'filtered_ent_counts'