# Copyright (c) 2016 Baidu, Inc. All Rights Reserved## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.frompaddle.proto.DataConfig_pb2importDataConfigg_config=NonedefSimpleData(files=None,feat_dim=None,context_len=None,buffer_capacity=None):data_config=DataConfig()data_config.type='simple'data_config.files=filesdata_config.feat_dim=feat_dimifcontext_lenisnotNone:data_config.context_len=context_lenifbuffer_capacity:data_config.buffer_capacity=buffer_capacityreturndata_configdefget_config_funcs(trainer_config):globalg_configg_config=trainer_configreturndict(SimpleData=SimpleData)