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

Widen tanh_fast signature #375

Merged
merged 4 commits into from
Jan 14, 2022
Merged

Widen tanh_fast signature #375

merged 4 commits into from
Jan 14, 2022

Conversation

mcabbott
Copy link
Member

@mcabbott mcabbott commented Jan 12, 2022

As noted here #371 (comment) defining as a fallback only tanh_fast(::Real) causes problems for Flux right now. And tanh of course makes sense for complex numbers.

But really, all the other activation functions only make sense for real numbers, since they often compare x>0 etc. In the interests of sanity and sensible guard-rails, they should probably all have signature ::Real not ::Any. But can't be changed just yet.

@mcabbott
Copy link
Member Author

CI fails on unrelated things which worked yesterday?

Test Summary:        | Pass  Total
223
Activation Functions | 1329   1329
224
Test Summary:          | Pass  Total
225
Batched Multiplication | 3327   3327
226
[ Info: Skipping Convolutional fuzzing tests, set NNLIB_TEST_FUZZING=true to run them
227
[ Info: Skipping Depthwise Convolutional fuzzing tests, set NNLIB_TEST_FUZZING=true to run them
228
Grouped Convolutions: Error During Test at /home/runner/work/NNlib.jl/NNlib.jl/test/conv.jl:659
229
  Got exception outside of a @test
230
  type Nothing has no field method
231
  Stacktrace:
232
    [1] getproperty
233
      @ ./Base.jl:42 [inlined]
234
    [2] matching_cr_sig(t::IRTools.Inner.Meta, s::Nothing)
235
      @ Zygote ~/.julia/packages/Zygote/umM0L/src/compiler/chainrules.jl:72
236
    [3] has_chain_rrule(T::Type)
237
      @ Zygote ~/.julia/packages/Zygote/umM0L/src/compiler/chainrules.jl:54
238

@darsnack
Copy link
Member

Getting the same issues locally on a completely separate project (getting Metalhead pre-training running).

@darsnack
Copy link
Member

The only thing I can see that has changed in this timeframe is ChainRules.jl/ChainRulesCore.jl but those changes seem completely orthogonal to the error.

@mcabbott
Copy link
Member Author

mcabbott commented Jan 12, 2022

Thanks, that's useful. If just pushed an upper bound to exclude ChainRules v1.18.0, today's version, just to see?

Except that I don't know the syntax it seems...

Project.toml Outdated Show resolved Hide resolved
@mcabbott mcabbott force-pushed the activate4 branch 2 times, most recently from e112404 to 2334492 Compare January 12, 2022 22:00
@mcabbott
Copy link
Member Author

This probably shouldn't wait too long, as the current state breaks Flux's tests.

Copy link
Member

@darsnack darsnack left a comment

Choose a reason for hiding this comment

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

Both this and FluxML/Flux.jl#1830 are okay with me, though I think this is safer to merge quickly and get tests up again.

@mcabbott mcabbott merged commit 65b46ca into FluxML:master Jan 14, 2022
@mcabbott mcabbott deleted the activate4 branch January 14, 2022 18:50
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