what will be the model_dir as parameter?
qingpeng opened this issue · 1 comments
I could train the model with training data without issues with the model saved in the directory:
/global/projectb/scratch/qpzhang/ViCA/second_run/train/all.tfrecord.model
The content in the directory is :
(vicaenv_denovo_35) qpzhang@denovo1:/global/projectb/scratch/qpzhang/ViCA/second_run/train/all.tfrecord.model> ls -R
.:
1514407805/
./1514407805:
saved_model.pb variables/
./1514407805/variables:
variables.data-00000-of-00001 variables.index
When I tried to use test data to evaluate the model, I got error about "Could not find trained model in model_dir:"
command:
(vicaenv_denovo_35) qpzhang@denovo1:/global/projectb/scratch/qpzhang/ViCA/second_run/train/all.tfrecord.model> python ~/Denovo35/vica/vica/vica_cli.py evaluate -i test.tfrecord --out output_dir --modeldir /global/projectb/scratch/qpzhang/ViCA/second_run/train/all.tfrecord.model --logfile evaluate.log
error
12:58:49: ERROR During tensorflow model evaluation the following exception occured:
Traceback (most recent call last):
File "/global/u2/q/qpzhang/Denovo35/vica/vica/train_eval.py", line 191, in evaluate
results = estimator.evaluate(input_fn=input_fn)
File "/global/homes/q/qpzhang/.conda/envs/vicaenv_denovo_35/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py", line 355, in evaluate
name=name)
File "/global/homes/q/qpzhang/.conda/envs/vicaenv_denovo_35/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py", line 797, in _evaluate_model
format(self._model_dir))
ValueError: Could not find trained model in model_dir: /global/projectb/scratch/qpzhang/ViCA/second_run/train/all.tfrecord.model.
in this case the model dir is: global/projectb/scratch/qpzhang/ViCA/second_run/train/all.tfrecord.model/1514407805/