|
|
@ -893,7 +893,7 @@ class MaxOut(Cfg):
|
|
|
|
self.add_keys(locals())
|
|
|
|
self.add_keys(locals())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def DataBase(async_load_data=False,
|
|
|
|
def create_data_config_proto(async_load_data=False,
|
|
|
|
constant_slots=None,
|
|
|
|
constant_slots=None,
|
|
|
|
data_ratio=1,
|
|
|
|
data_ratio=1,
|
|
|
|
is_main_data=True,
|
|
|
|
is_main_data=True,
|
|
|
@ -923,7 +923,7 @@ def SimpleData(files=None,
|
|
|
|
context_len=None,
|
|
|
|
context_len=None,
|
|
|
|
buffer_capacity=None,
|
|
|
|
buffer_capacity=None,
|
|
|
|
**xargs):
|
|
|
|
**xargs):
|
|
|
|
data_config = DataBase(**xargs)
|
|
|
|
data_config = create_data_config_proto(**xargs)
|
|
|
|
data_config.type = 'simple'
|
|
|
|
data_config.type = 'simple'
|
|
|
|
data_config.files = files
|
|
|
|
data_config.files = files
|
|
|
|
data_config.feat_dim = feat_dim
|
|
|
|
data_config.feat_dim = feat_dim
|
|
|
@ -945,7 +945,7 @@ def PyData(files=None,
|
|
|
|
constant_slots=None,
|
|
|
|
constant_slots=None,
|
|
|
|
load_thread_num=None,
|
|
|
|
load_thread_num=None,
|
|
|
|
**xargs):
|
|
|
|
**xargs):
|
|
|
|
data_config = DataBase(**xargs)
|
|
|
|
data_config = create_data_config_proto(**xargs)
|
|
|
|
data_config.type = 'py'
|
|
|
|
data_config.type = 'py'
|
|
|
|
if load_data_module in g_py_module_name_list:
|
|
|
|
if load_data_module in g_py_module_name_list:
|
|
|
|
|
|
|
|
|
|
|
@ -996,7 +996,7 @@ def ProtoData(files=None,
|
|
|
|
constant_slots=None,
|
|
|
|
constant_slots=None,
|
|
|
|
load_thread_num=None,
|
|
|
|
load_thread_num=None,
|
|
|
|
**xargs):
|
|
|
|
**xargs):
|
|
|
|
data_config = DataBase(**xargs)
|
|
|
|
data_config = create_data_config_proto(**xargs)
|
|
|
|
if type is None:
|
|
|
|
if type is None:
|
|
|
|
data_config.type = 'proto'
|
|
|
|
data_config.type = 'proto'
|
|
|
|
else:
|
|
|
|
else:
|
|
|
@ -1035,7 +1035,7 @@ def Data(type,
|
|
|
|
buffer_capacity=None,
|
|
|
|
buffer_capacity=None,
|
|
|
|
**xargs):
|
|
|
|
**xargs):
|
|
|
|
|
|
|
|
|
|
|
|
data_config = DataBase(**xargs)
|
|
|
|
data_config = create_data_config_proto(**xargs)
|
|
|
|
data_config.type = type
|
|
|
|
data_config.type = type
|
|
|
|
data_config.files = files
|
|
|
|
data_config.files = files
|
|
|
|
data_config.feat_dim = feat_dim
|
|
|
|
data_config.feat_dim = feat_dim
|
|
|
|