CNTK python API: How to get predictions from the trained model?

巧了我就是萌 提交于 2019-12-06 15:46:35

You have a few options:

  • Pass a set of data as numpy array (instance in CNTK 202 tutorial) where onehot data is passed in as a numpy array.

    pred = model.eval({model.arguments[0]:[onehot]})

  • Read the minibatch data and pass it to the eval function

    eval_input_map = { input : reader_eval.streams.features }
    eval_data = reader_eval.next_minibatch(eval_minibatch_size, input_map = eval_input_map) mydata = eval_data[input].value predicted= model.eval(mydata)

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