Zero is a real number (Flux.Nil)#1830
Conversation
|
Right now, if something accepted only
|
|
I'm not sure I follow your thinking, but let me explain mine, with apologies if this is too basic. For functions, normally want the widest signature for which they will give correct results. If you call C then perhaps that might be Of course Flux & friends have many For types, I think instead you want the narrowest signature which doesn't cause problems? Clearly |
|
Looking at my comment, I don't know what I meant either. I think my logic was backwards in a bit of a drive-by comment. I think this is a good PR to merge. |
To see what CI thinks, this gives the special
nilused foroutputsizesupertypeReal.The reason to do so is that really all the activation functions should be defined for
::Real, not::Anyin the name of sanity, and not::Numberto exclude complex numbers, since they often testx>0etc.Maybe this has consequences I don't see yet. They won't work in a function which with signature
::Complex, but nor did they before -- and most complex-valued things accept real numbers too.