繁体   English   中英

CNTK:访问经过培训的模型数据

[英]CNTK: Access to trained model data

我使用Python API在CNTK中训练了一个模型。 我想在Android设备上的代码中实现网络。

有没有办法可以访问网络权重,然后直接编码网络而不使用CNTK库?

我可以以人类可读的形式访问模型吗?

是的,你确定可以。 这些信息可以在CNTK github上找到(“我如何”部分)。

https://github.com/Microsoft/CNTK/wiki/Load-model-and-access-network-weights-(parameters)

您可以使用CNTK的dumpnode命令将CNTK训练的模型转换为txt格式。 这是内容配置文件txt.conf:

command = convert2txt

convert2txt = [
    action = "dumpnode"    
    modelPath="./cntkSpeechFF.dnn.5"
    nodeName = "Prior" # if not specified, all nodes will be printed
    outputFile = "./cntkSpeechFF.dnn.5.txt" # the path to the output file. If not specified a file name will be automatically generated based on the modelPath.

    printValues = true
    printMetadata = true

]

然后你运行cntk as

cntk configFile=txt.conf

暂无
暂无

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

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