Closed takuma-yoneda closed 6 years ago
hi, did you try load_dir=./dam
in addition to your command line call? this should load pretrained models. Should work also for partial models.
readers.reader_from_file("dam")
sets up the reader in eval mode, so it doesn't create the training part of the model. So in a notebook you can simply do:
snli_reader = readers.readers["dam_snli_reader"](shared_resources)
snli_reader.setup_from_data(snli_train_data, is_training=True)
snli_reader.load('dam')
@takuma-ynd just to add, for training you might want to think about using the command-line. The notebook is just an example for understanding the inner workings of jack. What is your task? The simplest way to set this up would be to convert your data into jack-json format, see example file .
@dirkweissenborn
Just adding load_dir=./dam
in command line call worked!
As you said, I've been currently converting the dataset to jack-json format and using it! Thanks for the kind explanation!
Currently, I am trying to use pre-trained DAM/ESIM model to train on another task. (i.e., train model on SNLI and use that weight as an initial weight for another training)
In model_training.ipynb, I expected that replacing cell 23
with
makes it work. However, I got the following error.
I could not really spend time for investigating it, but if there is a proper way to use pre-trained model for another training, please teach me.