简体   繁体   English

使用cntk训练模型与python

[英]use cntk trained model with python

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. 我已经使用CNTK训练了一个模型,现在可以调用simple.dnn进行测试阶段我不想在Windows上安装CNTK,但是使用经过训练的模型和python。 How can I use trained model (weights,...) for testing using python? 如何使用训练有素的模型(权重,...)进行python测试?

You can use the load_model function, see https://www.cntk.ai/pythondocs/cntk.html?highlight=load_model#cntk.persist.load_model . 您可以使用load_model函数,请参阅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)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM