如何从小批量中检索序列 ID?

How to retrieve sequence id's from minibatch?

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

"Sequence id is a number. It can be omitted, in which case the line number will be used as the 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)

如何从小批量中检索序列 ID?

这个序列号是一个内部编号,目前没有公开。请使用此线程中的建议。