def init_from_config(self, config): """ :param Config.Config config: """ from NetworkDescription import LayerNetworkDescription data_dims = LayerNetworkDescription.tf_extern_data_types_from_config(config) for key, init_args in data_dims.items(): # In Returnn with Theano, we usually have the shape (time,batch,feature). # In TensorFlow, the default is (batch,time,feature). # This is also what we use here, i.e.: # batch_dim_axis=0, time_dim_axis=1. See TFEngine.DataProvider._get_next_batch(). self.data[key] = Data(name=key, auto_create_placeholders=True, **init_args) self.default_target = config.value('target', 'classes')