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

fix dynamic model cannot track PRelu weights gradients problem #982

Merged
merged 2 commits into from
May 26, 2019
Merged

fix dynamic model cannot track PRelu weights gradients problem #982

merged 2 commits into from
May 26, 2019

Conversation

1FengL
Copy link
Contributor

@1FengL 1FengL commented May 25, 2019

Checklist

  • I've tested that my changes are compatible with the latest version of Tensorflow.
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

In dynamic mode, gradients do not exist for PRelu layer weights.
This is because calculations involving weights of PRelu layer must be done in the forward() function, otherwise gradients will be intractable.

Description

Recalculate alpha_var_constrained using alpha_var in every forward() call.
Tests in test_layers_activation.py passed.

@zsdonghao zsdonghao merged commit 6b7f1f8 into tensorlayer:master May 26, 2019
@zsdonghao zsdonghao deleted the fix-PRELU branch May 26, 2019 12:01
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.

2 participants