mirror of https://github.com/Jittor/Jittor
fix assign var in th_mode
This commit is contained in:
parent
87489d719e
commit
44fdc718ab
|
@ -9,7 +9,7 @@
|
|||
# file 'LICENSE.txt', which is part of this source code package.
|
||||
# ***************************************************************
|
||||
|
||||
__version__ = '1.3.5.41'
|
||||
__version__ = '1.3.5.42'
|
||||
from jittor_utils import lock
|
||||
with lock.lock_scope():
|
||||
ori_int = int
|
||||
|
|
|
@ -133,6 +133,9 @@ string VarHolder::to_string() {
|
|||
}
|
||||
|
||||
VarHolder* VarHolder::assign(VarHolder* v) {
|
||||
if (th_mode) {
|
||||
v->set_requires_grad(get_requires_grad());
|
||||
}
|
||||
assign_var(v->var, var);
|
||||
v->var->own_both_liveness();
|
||||
var->release_both_liveness();
|
||||
|
|
Loading…
Reference in New Issue