LiuQL2 / MedicalChatbot

Medical-domain Dialogue System for Diseases Identification
118 stars 38 forks source link

how to run test #2

Open lonelydancer opened 5 years ago

lonelydancer commented 5 years ago

I have trained the model. how can i run interference as a dialog system?

LiuQL2 commented 5 years ago

There is a parameter in run.py, namely train_mode. Changing it to False for testing and the code will use the testing samples automatically. The printed results are the performances of the trained model evaluated on testing set.

python src/dialogue_system/run/run.py --saved_model=path_to_your_model --train_mode=False
ares5221 commented 5 years ago

halo, i run test with set train_mode =False python src/dialogue_system/run/run.py --saved_model=path_to_your_model --train_mode=False but error is: ValueError: The passed save_path is not a valid checkpoint: ./../model/dqn/checkpoint/checkpoint_d4_agt1_dqn1/model_d4_agent1_dqn1_s0.619_r18.221_t4.266_wd0.0_e432.ckpt this checkpoint files is generate when train_mode =True so this miss file is generate in special paramater or just loss and not upload in git

ares5221 commented 5 years ago

halo, i run test with set train_mode =False python src/dialogue_system/run/run.py --saved_model=path_to_your_model --train_mode=False but error is: ValueError: The passed save_path is not a valid checkpoint: ./../model/dqn/checkpoint/checkpoint_d4_agt1_dqn1/model_d4_agent1_dqn1_s0.619_r18.221_t4.266_wd0.0_e432.ckpt this checkpoint files is generate when train_mode =True so this miss file is generate in special paramater or just loss and not upload in git

i fix this question by rename the train checkpoint file by the require name model_d4_agent1_dqn1_s0.619_r18.221_t4.266_wd0.0_e432.ckpt it works

ysgncss commented 3 years ago

当我x训练完成,测试时直接退出了程序: `save/SaveV2/tensor_names: (Const): /job:localhost/replica:0/task:0/device:CPU:0 save/SaveV2/shape_and_slices: (Const): /job:localhost/replica:0/task:0/device:CPU:0 save/RestoreV2/tensor_names: (Const): /job:localhost/replica:0/task:0/device:CPU:0 save/RestoreV2/shape_and_slices: (Const): /job:localhost/replica:0/task:0/device:CPU:0 loading trained model

Process finished with exit code -1073741819 (0xC0000005)`

ysgncss commented 3 years ago

是因为缺少--dialogue_file参数的文件吗?我想复原整个对话流程应该怎么做

AndreaMarino94 commented 2 years ago

halo, i run test with set train_mode =False python src/dialogue_system/run/run.py --saved_model=path_to_your_model --train_mode=False but error is: ValueError: The passed save_path is not a valid checkpoint: ./../model/dqn/checkpoint/checkpoint_d4_agt1_dqn1/model_d4_agent1_dqn1_s0.619_r18.221_t4.266_wd0.0_e432.ckpt this checkpoint files is generate when train_mode =True so this miss file is generate in special paramater or just loss and not upload in git

you can take the saved_model path, from checkpoint.txt in "src\dialogue_system\model\dqn\checkpoint04"