Seq2Seq-Vis icon indicating copy to clipboard operation
Seq2Seq-Vis copied to clipboard

Demo DE-EN model

Open mpsilfve opened this issue 6 years ago • 0 comments

Hi,

Is the demo DE-EN model from the http://seq2seq-vis.io/ available? I tried to use the EN-DE model from the OpenNMT webpage (http://opennmt.net/Models-py/) but I can't get it to work. When running extract_context.py, I get an error message:

python3 OpenNMT-py/extract_context.py -src en-de-model/train.en -tgt en-de-model/train.de -model averaged-10-epoch.pt -batch_size 4096

Loading model parameters.
Traceback (most recent call last):
  File "OpenNMT-py/extract_context.py", line 356, in <module>
    main()
  File "OpenNMT-py/extract_context.py", line 335, in main
    onmt.ModelConstructor.load_test_model(opt, dummy_opt.__dict__)
  File "/Users/mpsilfve/src/Seq2Seq-Vis/OpenNMT-py/onmt/ModelConstructor.py", line 124, in load_test_model
    use_gpu(opt), checkpoint)
  File "/Users/mpsilfve/src/Seq2Seq-Vis/OpenNMT-py/onmt/ModelConstructor.py", line 199, in make_base_model
    model.load_state_dict(checkpoint['model'])
  File "/anaconda3/envs/s2sv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 522, in load_state_dict
    .format(name))
KeyError: 'unexpected key "decoder.transformer_layers.0.context_attn.final_linear.weight" in state_dict'

mpsilfve avatar Oct 04 '18 10:10 mpsilfve