Merge pull request #16449 from panyx0718/imperative3

fix imperative varbase creation
move-code
Xin Pan 6 years ago committed by GitHub
commit 0fff666f14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -403,8 +403,8 @@ class Variable(object):
self._ivar = core.VarBase(
name, dtype if dtype else core.VarDesc.VarType.FP32,
list(shape) if shape else [],
_current_expected_place(), True
if persistable else False, stop_gradient)
_current_expected_place(), stop_gradient, True
if persistable else False)
if persistable:
_imperative_tracer().trace_var(name, self)
else:

Loading…
Cancel
Save