How can I load two models at a time?
Hi, The command "m=LoadModel (modelFileName, format="cntk")" can load a model from a disk file. But now I want to load two models at a time. How can I do this? Does CNTK support this load action? Looking forward to your reply! Thank you.
Hi, Could you elaborate more on the reason behind loading multiple models? i.e. Are you trying to train multiple models concurrently?, evaluate them?, daisy chain them?
For now, you can load multiple models for evaluation using the evaluation engine (EvalDLL) in Windows (soon for Linux). You can refer to the Evaluate Multiple Models page for further information.
Thanks for your reply. Well, I want to do joint training. So I need to use these two well trained models as initialization. The output of the first model is feed to the input of the second model. But I find the last loaded model is regarded as default model and the firstly loaded model does not exit any more.
you can still use a.xyz to reference the other model if a is the variable if loaded model. please consult the cntk pdf book for additional info.
Thanks for your reply. Well, I want to do joint training. So I need to use these two well trained models as initialization. The output of the first model is feed to the input of the second model. But I find the last loaded model is regarded as default model and the firstly loaded model does not exit any more.
You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/Microsoft/CNTK/issues/627#issuecomment-228788775
Hi, I have consulted the cntk book, but still can not solve it. Here is the command in my mel file: m1 = LoadModel("$CurrModel1$", format="cntk") SetDefaultModel(m1) m2 = LoadModel("$CurrModel2$", format="cntk") newnode1 = BFF(IBM.S, 2048, 129) newnode2 = Plus(DNN_B_L1.BFF2.FF.P, DNN_B_L1.BFF1.FF.P) setInputs(DNN_B_L1.BFF_final,newnode2,newnode1)
IBM.S refer to node in "$CurrModel1". DNN_B_L1.BFF2.FF.P, DNN_B_L1.BFF1.FF.P, and DNN_B_L1.BFF_final all refer to nodes in "$CurrModel2".
I got error as follows: EXCEPTION occurred: FindSymbols could not find a symbol for DNN_B_L1.BFF_final
If I set "$CurrModel2" as default model. Then I got error too: EXCEPTION occurred: Parameter name could not be resolved 'IBM.S'
Use m2.DNN_B_L1.BFF_final
Hi, thank you. Like what you said, I use m2.DNN_B_L1.BFF_final to refer to node in the secode model. But 'm2.DNN_B_L1.BFF1.FF.P' could not be resolved either. And I could not get the parameters in the second model by using m2.DNN_B_L1.BFF1.W and m2.DNN_B_L1.BFF1.B.
Something might have been changed? The following is examples from the old test cases (in modelEditor.txt in the repository):
Copy(m2.L2..W, L2..W, copy=value)
Copy(m2.L2..B, L2..B, copy=value)
Hi, thank you very much. Like what you said, I can get the parameters by using 'Copy' function first not just by using m2.L2..W or m2.L2..B.
This issue has been dormant for a long while, please check out the latest CNTK release. Model evaluation in CNTK has been improved significantly. Please check https://docs.microsoft.com/en-us/cognitive-toolkit/CNTK-Evaluation-Overview If you still run into problems, please open a new issue.