Skip to content

Commit

Permalink
Fix pop parse opset11 (PaddlePaddle#183)
Browse files Browse the repository at this point in the history
* clean code

* fix pop_parse for opset11

* fix load parse_onnx
  • Loading branch information
gglin001 authored Sep 23, 2021
1 parent b12ea56 commit fdffcf2
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ Node *CreateConv(Graph *graph, Node *node, const std::vector<Node *> &inputs,
Node *CreateSoftmaxOpset11(Graph *graph, Node *node,
const std::vector<Node *> &inputs,
const std::vector<Node *> &outputs, int64_t axis) {
auto x_shape = node->Op()->Block()->FindVar(inputs[0]->Name())->GetShape();
PADDLE_ENFORCE_EQ(inputs.size(), 1, platform::errors::InvalidArgument(
"Softmax op only support one input"));
auto x_shape = inputs[0]->Var()->GetShape();
int x_rank = x_shape.size();
if (axis < 0) {
axis = axis + x_rank;
Expand Down
Loading

0 comments on commit fdffcf2

Please sign in to comment.