提交 2b32302b 编写于 作者: L lujun

move dygraph.nn,dygraph.layer to fluid, test=develop

上级 71725675
...@@ -482,7 +482,7 @@ class Variable(object): ...@@ -482,7 +482,7 @@ class Variable(object):
self.block.vars[name] = self self.block.vars[name] = self
self.op = None self.op = None
self.stop_gradient = stop_gradient self._stop_gradient = stop_gradient
self.is_data = is_data self.is_data = is_data
def numpy(self): def numpy(self):
...@@ -551,14 +551,14 @@ class Variable(object): ...@@ -551,14 +551,14 @@ class Variable(object):
if _in_dygraph_mode(): if _in_dygraph_mode():
return self._ivar.stop_gradient return self._ivar.stop_gradient
else: else:
return self.stop_gradient return self._stop_gradient
@stop_gradient.setter @stop_gradient.setter
def stop_gradient(self, s): def stop_gradient(self, s):
if _in_dygraph_mode(): if _in_dygraph_mode():
self._ivar.stop_gradient = s self._ivar.stop_gradient = s
else: else:
self.stop_gradient = s self._stop_gradient = s
@property @property
def persistable(self): def persistable(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册