简体   繁体   中英

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. How can I use trained model (weights,...) for testing using python?

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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