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

Remove scale for add #835

Merged
merged 2 commits into from
Jul 22, 2022
Merged

Conversation

wjj19950828
Copy link
Collaborator

@wjj19950828 wjj19950828 commented Jul 20, 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 contributes

1、当乘数为1时,去掉scale op
2、solve PaddlePaddle/Paddle#44455

get_value(layer, "x", different_attrs),
layer.attrs["alpha"],
get_value(layer, "y", different_attrs))
if layer.attrs["alpha"] == 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

alpha应该是个float?

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.改为abs(layer.attrs["alpha"] - 1.) < 1e-6

@jiangjiajun jiangjiajun merged commit 449a207 into PaddlePaddle:develop Jul 22, 2022
@wjj19950828 wjj19950828 deleted the rm_scaleforadd branch July 22, 2022 12:19
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