-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tensor fluid code transfer part2 #41096
tensor fluid code transfer part2 #41096
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -14,27 +14,138 @@ | |||
|
|||
from __future__ import print_function | |||
import numpy as np | |||
import math | |||
from paddle.common_ops_import import fill_constant | |||
from ..fluid.layers import utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to decouple with fluid.layers.utils or move them outside of fluid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个utils调用的是内部API,比如utils.convert_shape_to_list(shape)、utils.get_shape_tensor_inputs。
当前还没有新路径放置,所以最后再处理。
@@ -13,7 +13,7 @@ | |||
# limitations under the License. | |||
|
|||
import numpy as np | |||
from ..fluid.layer_helper import LayerHelper | |||
from ..framework import LayerHelper | |||
from ..framework import _varbase_creator, _dygraph_tracer | |||
from ..fluid.data_feeder import check_variable_and_dtype, check_type, check_dtype | |||
from ..static import Variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L21 below: from ..fluid.layers import transpose, cast # noqa: F401
can we delete transpose(not use below) and use paddle.cast instead of fluid.layers.cast
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件已在pr#40034中修改,这里只单独修改了LayerHelper
@@ -14,7 +14,7 @@ | |||
from __future__ import print_function | |||
import numpy as np | |||
import paddle | |||
from ..fluid.layer_helper import LayerHelper | |||
from ..framework import LayerHelper | |||
from ..fluid.data_feeder import check_variable_and_dtype, check_type, check_dtype | |||
from ..fluid import layers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only functions of layers.fill_constant and layers.where are used in this file, can we use paddle.full and paddle.where instead of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件已在pr#40034中修改,这里只单独修改了LayerHelper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, remind Todos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
APIs
Describe
tensor fluid code transfer part2