【问题标题】:CNTK: Access to trained model dataCNTK:访问经过训练的模型数据
【发布时间】:2017-01-10 03:30:38
【问题描述】:

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

有没有一种方法可以让我访问网络权重,然后直接对网络进行编码而不使用 CNTK 库?

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

【问题讨论】:

    标签: python cntk


    【解决方案1】:

    是的,你当然可以。该信息可以在 CNTK github 上找到(“我如何”部分)。

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

    【讨论】:

    • 您对如何最好地重新实施网络有任何指导吗?
    【解决方案2】:

    您可以使用 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作为

    cntk configFile=txt.conf
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-19
      • 2019-05-28
      • 1970-01-01
      • 2017-07-28
      • 1970-01-01
      相关资源
      最近更新 更多