cmusphinx / g2p-seq2seq

G2P with Tensorflow
Other
670 stars 194 forks source link

Evaluate a particular model #137

Closed maya-ami closed 6 years ago

maya-ami commented 6 years ago

Hi! I was wondering if it is possible to evaluate the performance of a particular model. I'm training a model and at the moment it is on 28001st step. When I evaluate the model with the code g2p-seq2seq --evaluate Baseform_seq2seq/testBASEFORM.dic --model_dir modelBASEFORM, by default it loads model.ckpt-28001. Is there a way to explicitly specify which model should be evaluated? Let's say I want to test the model.ckpt-14001. I tried g2p-seq2seq --evaluate Baseform_seq2seq/testBASEFORM.dic --model_dir modelBASEFORM/model.ckpt-14001 but I got an Exception error: modelBASEFORM/model.ckpt-14001/model.params not exists. Thanks in advance!

nurtas-m commented 6 years ago

Yes, it is possible if you have saved model. By default, the program tries to download the model that pointed out in "checkpoint" file. So, just edit this file: model_checkpoint_path: "model.ckpt-14001" all_model_checkpoint_paths: "model.ckpt-14001" And run: g2p-seq2seq --evaluate Baseform_seq2seq/testBASEFORM.dic --model_dir modelBASEFORM