ATen
ATen copied to clipboard
Multiple definitions of tanh (TH and THNN)
At the moment, we seem to have multiple definitions of tanh. From Declarations:
[[
name: tanh
types:
- floating_point
backends:
- CPU
- CUDA
variants:
- method
- function
return: argument 0
arguments:
- arg: THTensor* result
output: True
- THTensor* self
]]
and from nn
TH_API void THNN_(Tanh_updateOutput)(
THNNState *state,
THTensor *input,
THTensor *output);
TH_API void THNN_(Tanh_updateGradInput)(
THNNState *state,
THTensor *gradOutput,
THTensor *gradInput,
THTensor *output);
This seems highly questionable. At the moment, the non-NN definition wins and the NN definition is relegated to the method name _tanh
(at the time of writing, I have no idea where this actually happens). Is this actually by design? Where is this explained?