-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
Added test for Alpha Dropout #2367
base: master
Are you sure you want to change the base?
Conversation
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.
This looks good. The changes to AlphaDropout
normalization tests look good. The newly added test file can just be deleted.
Can you delete the So far, this PR is on the correct trend, but not targeting the right set of tests to replace. Specifically, we want to replace Flux.jl/test/layers/normalisation.jl Lines 105 to 113 in 1af3f4d
In other words, you should pass in a known input ( |
Hi @darsnack, the |
Also, the problem is caused by this test. @test mean(y) ≈ (q*u) + ((1-q)*α′) I will update the normalisation.jl file with this test as I cannot see it right now. I just want to know where am I going wrong in this? |
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 test fails here. The part that you suggested has no relation with this code I guess. Rest, please let me know what is wrong here.
That's because that test is testing for the wrong thing. The scaling parameters in the The code that I pointed out in the review is the actual lines of code that the original issue is referring to. |
Not |
Hi @darsnack @ToucheSir, I have prepared a code sample of what I have understood. Please let me know if its correct or what needs to corrected. x = ones(100)
println(x)
println("MEAN of x: ", mean(x))
m = AlphaDropout(0.4);
println(m)
y = evalwgrad(m, x)
y_ = m(x)
println(y)
println(y_)
println("MEAN of y: ", mean(y))
println("MEAN of y_: ", mean(y_))
println("SUM: ", sum(evalwgrad(m, x)))
@test mean(y) ≈ mean(y_) atol=0.1 |
First, We are asking have you look at An alternative test would be to look not at the mean and variance of |
Initial pull request for the Issue #1851, stating adding tests for the Alpha Dropout. This PR is based on my intial understanding of the problem. Would love to alter it further to solve the issue.
PR Checklist