提交 2831d752 编写于 作者: T tangwei

fix platform

上级 65909976
import abc import abc
from fleetrec.core.utils import envs
class Model(object): class Model(object):
"""R """R
...@@ -15,6 +15,7 @@ class Model(object): ...@@ -15,6 +15,7 @@ class Model(object):
self._data_loader = None self._data_loader = None
self._fetch_interval = 20 self._fetch_interval = 20
self._namespace = "train.model" self._namespace = "train.model"
self._platform = envs.get_platform()
def get_inputs(self): def get_inputs(self):
return self._data_var return self._data_var
......
...@@ -57,6 +57,8 @@ class Model(ModelBase): ...@@ -57,6 +57,8 @@ class Model(ModelBase):
self._data_var.append(input) self._data_var.append(input)
self._data_var.append(self.label_input) self._data_var.append(self.label_input)
if self._platform != "LINUX":
self._data_loader = fluid.io.PyReader( self._data_loader = fluid.io.PyReader(
feed_list=self._data_var, capacity=64, use_double_buffer=False, iterable=False) feed_list=self._data_var, capacity=64, use_double_buffer=False, iterable=False)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册