use cntk trained model with python

时光怂恿深爱的人放手 提交于 2019-12-01 18:04:12

问题


I have trained a model using CNTK, lets call simple.dnn now for the phase of testing I do not want to install CNTK on windows,but use trained model with python. How can I use trained model (weights,...) for testing using python?


回答1:


You can use the load_model function, see https://www.cntk.ai/pythondocs/cntk.html?highlight=load_model#cntk.persist.load_model. The basic flow should look like this:

from cntk import load_model

loaded_model = load_model("yourModel.model", 'float')
output = model.eval(arguments)


来源:https://stackoverflow.com/questions/40504635/use-cntk-trained-model-with-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!