Skip to content

Commit

Permalink
Patched python level LoDTensor
Browse files Browse the repository at this point in the history
  • Loading branch information
jim19930609 committed Jan 12, 2022
1 parent 786df9a commit 064eb19
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/paddle/fluid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
except Exception as e:
raise e

# Patch LoDTensor
import core
core.LoDTensor = core.Tensor

# import all class inside framework into fluid module
from . import framework
from .framework import *
Expand Down Expand Up @@ -70,9 +74,6 @@
from .param_attr import ParamAttr, WeightNormParamAttr
from .data_feeder import DataFeeder

import core
core.LoDTensor = core.Tensor

from .core import LoDTensorArray, Scope, _Scope
from .core import CPUPlace, XPUPlace, CUDAPlace, CUDAPinnedPlace, NPUPlace, IPUPlace, MLUPlace
from .incubate import fleet
Expand Down

0 comments on commit 064eb19

Please sign in to comment.