提交 539eeb3f 编写于 作者: X xjqbest

fix

上级 8d9cd968
...@@ -49,7 +49,7 @@ class Model(object): ...@@ -49,7 +49,7 @@ class Model(object):
return return
self._slot_inited = True self._slot_inited = True
dataset = {} dataset = {}
model_dict = {}#self._env["executor"]#[kargs["name"]] model_dict = {}
for i in self._env["executor"]: for i in self._env["executor"]:
if i["name"] == kargs["name"]: if i["name"] == kargs["name"]:
model_dict = i model_dict = i
...@@ -59,12 +59,8 @@ class Model(object): ...@@ -59,12 +59,8 @@ class Model(object):
dataset = i dataset = i
break break
name = "dataset." + dataset["name"] + "." name = "dataset." + dataset["name"] + "."
sparse_slots = envs.get_global_env(name + "sparse_slots")#"sparse_slots", None, sparse_slots = envs.get_global_env(name + "sparse_slots")
#"train.reader")
dense_slots = envs.get_global_env(name + "dense_slots") dense_slots = envs.get_global_env(name + "dense_slots")
#"dense_slots", None, "train.reader")
#print(sparse_slots)
#print(dense_slots)
if sparse_slots is not None or dense_slots is not None: if sparse_slots is not None or dense_slots is not None:
sparse_slots = sparse_slots.strip().split(" ") sparse_slots = sparse_slots.strip().split(" ")
dense_slots = dense_slots.strip().split(" ") dense_slots = dense_slots.strip().split(" ")
...@@ -87,13 +83,11 @@ class Model(object): ...@@ -87,13 +83,11 @@ class Model(object):
self._data_var.append(l) self._data_var.append(l)
self._sparse_data_var.append(l) self._sparse_data_var.append(l)
#dataset_class = dataset["type"]#envs.get_global_env("dataset_class", None, dataset_class = dataset["type"]
# "train.reader") if dataset_class == "DataLoader":
#if dataset_class == "DataLoader": self._init_dataloader()
# self._init_dataloader()
def _init_dataloader(self): def _init_dataloader(self):
#print(self._data_var)
self._data_loader = fluid.io.DataLoader.from_generator( self._data_loader = fluid.io.DataLoader.from_generator(
feed_list=self._data_var, feed_list=self._data_var,
capacity=64, capacity=64,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册