1

如果我像这样创建一个 MinibatchSource:

reader_test = MinibatchSource(ImageDeserializer('test_map.txt', StreamDefs(
    features = StreamDef(field='image', transforms=transforms), # first column in map file is referred to as 'image'
    labels   = StreamDef(field='label', shape=num_classes)      # and second as 'label'
)))

然后我可以像这样进入功能流:

reader_test.streams.features

但是,如果我这样创建 MiniBatchSource:

image_source = ImageDeserializer('test_map.txt', StreamDefs(
    features = StreamDef(field='image', transforms=transforms), # first column in map file is referred to as 'image'
    labels   = StreamDef(field='label', shape=num_classes)      # and second as 'label'
))

text_source = CTFDeserializer("test_map2.txt")
text_source.map_input('index', dim=1, format="dense")
text_source.map_input('piece_type', dim=6, format="dense")

# define a composite reader
reader_config = ReaderConfig([image_source, text_source])
mb_source = reader_config.minibatch_source()

试试这个:

mb_source.streams.features

结果是:

AttributeError: 'MinibatchSource' object has no attribute 'streams'

我怎样才能进入功能流?

4

1 回答 1

-1

很久以前就已经解决了这个问题。

于 2017-08-22T22:27:08.933 回答