【问题标题】:How to retrieve sequence id's from minibatch?如何从小批量中检索序列 ID?
【发布时间】:2017-01-09 10:31:46
【问题描述】:

发件人:https://github.com/Microsoft/CNTK/wiki/CNTKTextFormat-Reader

"Sequence id 是一个数字,可以省略,此时行号作为sequence id。"

假设我从这样的来源创建了一个小批量:

地图文件:

|labels 0 0 0 1 0 0 |features 3
|labels 0 0 0 0 0 1 |features 7
|labels 1 0 0 0 0 0 |features 1
|labels 1 0 0 0 0 0 |features 9
|labels 1 0 0 0 0 0 |features 4

代码:

from cntk import Trainer, StreamConfiguration, text_format_minibatch_source, learning_rate_schedule, UnitType

mb_source = text_format_minibatch_source('test_map2.txt', [
    StreamConfiguration('features', 1),
    StreamConfiguration('labels', 6)])

test_minibatch = mb_source.next_minibatch(5)

如何从 minibatch 中检索序列 ID?

【问题讨论】:

    标签: cntk


    【解决方案1】:

    此序列 ID 是内部编号,当前未公开。请使用此线程的建议。

    How to get to the original index from a minibatch?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多