首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >CNTK抱怨功能没有实现

CNTK抱怨功能没有实现
EN

Stack Overflow用户
提问于 2017-01-12 22:36:10
回答 1查看 197关注 0票数 2

我在Brainscript中有下面的网络。

代码语言:javascript
运行
复制
BrainScriptNetworkBuilder = {
    inputDim = 4
    labelDim = 1
    embDim = 20
    hiddenDim = 40

    model = Sequential (
        EmbeddingLayer {embDim} :                            # embedding
        RecurrentLSTMLayer {hiddenDim, goBackwards=false} :  # LSTM
        DenseLayer {labelDim}                                # output layer
    )

    # features
    t = DynamicAxis{}
    features = SparseInput {inputDim, tag="feature", dynamicAxis=t}
    anomaly  = Input {labelDim, tag="label"}

    # model application
    z = model (features)

    zp = ReconcileDynamicAxis(z, anomaly)

    # loss and metric
    ce   = CrossEntropyWithSoftmax (anomaly, zp)
    errs = ClassificationError     (anomaly, zp)

    featureNodes    = (features)
    labelNodes      = (anomaly)
    criterionNodes  = (ce)
    evaluationNodes = (errs)
    outputNodes     = (z)
}

我的数据是这样的:

代码语言:javascript
运行
复制
2 |Features -0.08169 -0.07840 -0.09580 -0.08748 
2 |Features 0.00354 -0.00089 0.02832 0.00364 
2 |Features -0.18999 -0.12783 -0.02612 0.00474 
2 |Features 0.16097 0.11350 -0.01656 -0.05995 
2 |Features 0.09638 0.07632 -0.04359 0.02183 
2 |Features -0.12585 -0.08926 0.02879 -0.00414 
2 |Features -0.10224 -0.18541 -0.16963 -0.05655 
2 |Features 0.08327 0.15853 0.02869 -0.17020 
2 |Features -0.25388 -0.25438 -0.08348 0.13638 
2 |Features 0.20168 0.19566 -0.11165 -0.40739 |IsAnomaly 0

当我运行cntk命令来尝试训练一个模型时,我会得到以下异常。

异常发生:内部文件: Matrix.cpp行: 1323功能:Microsoft::MSR::CNTK::MSR::SetValue ->特性未实现。

我遗漏了什么?

EN

Stack Overflow用户

回答已采纳

发布于 2017-01-12 23:00:08

以下是一些建议:

  • 首先,输入应该与读取器中描述的数据中的类型匹配。因此,功能变量不应该是稀疏的,因为数据中的输入是密集的。
  • 其次,LSTM将输出一个输出序列,在输入序列中每个样本输出一个输出序列。除了最后一个,你需要忽略所有。 model = Sequential ( DenseLayer {embDim}:# embedding {hiddenDim,goBackwards=false}:# LSTM BS.Sequences.Last:#只使用LSTM序列DenseLayer {labelDim,activation=Sigmoid} #输出层中的最后一个)
票数 2
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41624271

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档