次のような 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'
機能ストリームにアクセスするにはどうすればよいですか?