Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

use cntk trained model with python

Tags:

python

cntk

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?

like image 704
RahimEnt Avatar asked Nov 09 '16 10:11

RahimEnt


1 Answers

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)
like image 90
pkranen Avatar answered Oct 23 '22 09:10

pkranen