Skip to content

Commit 064eb19

Browse files
committed
Patched python level LoDTensor
1 parent 786df9a commit 064eb19

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/paddle/fluid/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
except Exception as e:
3333
raise e
3434

35+
# Patch LoDTensor
36+
import core
37+
core.LoDTensor = core.Tensor
38+
3539
# import all class inside framework into fluid module
3640
from . import framework
3741
from .framework import *
@@ -70,9 +74,6 @@
7074
from .param_attr import ParamAttr, WeightNormParamAttr
7175
from .data_feeder import DataFeeder
7276

73-
import core
74-
core.LoDTensor = core.Tensor
75-
7677
from .core import LoDTensorArray, Scope, _Scope
7778
from .core import CPUPlace, XPUPlace, CUDAPlace, CUDAPinnedPlace, NPUPlace, IPUPlace, MLUPlace
7879
from .incubate import fleet

0 commit comments

Comments
 (0)