IntelLabs / nlp-architect

A model library for exploring state-of-the-art deep learning topologies and techniques for optimizing Natural Language Processing neural networks
https://intellabs.github.io/nlp-architect
Apache License 2.0
2.94k stars 448 forks source link

memn2n_dialog Interactive mode error #155

Open akshayvijapur opened 4 years ago

akshayvijapur commented 4 years ago

I am trying out example provided in NLP Architect named "memn2n_dialogue".

I did train using command

python examples/memn2n_dialog/train_model.py --task 5 --weights_save_path memn2n_weights.npz

Saw some errors in training Epoch 0: 100%|█████████████████████████████████████████████████████████████████████████████████| 576/576 [00:14<00:00, 38.76minibatches/s] Epoch 0: Validation Error: 0.3751085069444444

Training took some time and following files are generated.

    checkpoint
    data/
    memn2n_weights.npz.data-00000-of-00001
    memn2n_weights.npz.index
    memn2n_weights.npz.meta

Then I tried to do interactive mode using command python examples/memn2n_dialog/interactive.py --weights_save_path memn2n_weights.npz

But encountering following error.

"/home/avijapur/.local/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py"

 tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file
 /home/avijapur/delete/nlparchitect/nlp-architect/exampleshts.npz.data-00000-of-00001: 
 Data loss: not an sstable   (bad magic number): perhaps your file is in a different file format 
 and you need torator?

python3.6 examples/memn2n_dialogue/interactive.py --weights_save_path m-of-00001

Environment setup:

walter-grace commented 4 years ago

@akshayvijapur were you getting any errors training to train the model? I am having an issue with running python train_model.py --task 5 --weights_save_path saved_tf/ --test _from .babi_dialog import BABI_Dialog ModuleNotFoundError: No module named 'main.babidialog'; 'main' is not a package

akshayvijapur commented 4 years ago

Yeah i got that error, But resolved by correcting imports, Means remove dot (.) from imports and relative imports.