-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[PDPD]Added and fixed Paddle convert. #28347
base: master
Are you sure you want to change the base?
Conversation
build_jenkins |
Hi @ceciliapeng2011 Could you please take a review? Thanks! |
#include "default_opset.hpp" | ||
#include "openvino/frontend/paddle/node_context.hpp" | ||
#include "openvino/opsets/opset15.hpp" | ||
#include "openvino/opsets/opset4.hpp" |
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.
opset15 is back compatible to previous opsets. We can keep only opset15 header here.
void normalize(std::vector<int64_t>& vec, const Output<Node> intput, const std::vector<int64_t> axes_vec) { | ||
for (size_t i = 0; i < axes_vec.size(); i++) { | ||
if (vec[i] < 0) { | ||
auto x_dim = std::stoll(intput.get_partial_shape()[axes_vec[i]].to_string()); |
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.
Can we simply use
auto x_dim = intput.get_partial_shape()[axes_vec[i]];
here?
for (int64_t i : vec) { | ||
if (i < 0) | ||
return true; | ||
void normalize(std::vector<int64_t>& vec, const Output<Node> intput, const std::vector<int64_t> axes_vec) { |
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.
void normalize(std::vector<int64_t>& vec, const Output<Node> intput, const std::vector<int64_t> axes_vec) { | |
void normalize(std::vector<int64_t>& vec, const Output<Node> input, const std::vector<int64_t> axes_vec) { |
return res; | ||
} | ||
|
||
Output<Node> get_1d_tensor(const Output<Node>& node) { |
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.
Do you meet any problem here without inserting unsqueeze node when node_dim == 0? OpenVINO supports scalar (rank==0).
return res; | ||
} | ||
|
||
Output<Node> get_1d_tensor(const Output<Node>& node) { |
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.
The name "get_1d_tensor" sounds a bit mis-leading - it does not turn any tensor to 1D, right?Suggest change to something like "get_tensor_safe".
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. Leave some minor comments.
build_jenkins |
Details:
Tickets: