Skip to content
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

Support ONNX Roberta model #793

Merged
merged 14 commits into from May 11, 2022
Merged

Conversation

wjj19950828
Copy link
Collaborator

@wjj19950828 wjj19950828 commented May 10, 2022

Create A Good Pull Request

下面的文字请保留在PR说明的最后面,并在提完PR后,根据实际情况勾选确认以下情况

Please check the follow step before merging this pull request

  • Python code style verification
  • Review all the code diff by yourself
  • All models(TensorFLow/Caffe/ONNX/PyTorch) testing passed
  • Details about your pull request, releated issues

If this PR add new model support, please update model_zoo.md and add model to out test model zoos(@wjj19950828)

  • New Model Supported
  • No New Model Supported

Do follow contribues

1、新增CumSum op
Note:目前仅支持axis为constant tensor,如下图
image
2、支持ONNX Roberta、XLM-Roberta模型

def CumSum(self, node):
val_x = self.graph.get_input_node(node, idx=0, copy=True)
axis = self.graph.get_input_node(node, idx=1, copy=True)
axis_values = _const_weight_or_none(axis)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个const_weight_or_none是指会返回None的结果吗,需要特殊处理为None的情况吗

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.若得到的值为None直接assert掉

@wjj19950828 wjj19950828 merged commit 4eb7510 into PaddlePaddle:develop May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants