Repository navigation
v1.0.1 tanh backward bug fixed
Bug Fix: Tanh Backward Pass
- Fixed a bug in
TanhBackwardwhereonesLike()received the output tensor's shape instead of the tensor itself. - Corrected the call to
onesLike(this.output)to ensure proper tensor initialization during backpropagation. - Resolves the
TypeError: e.shape is not iterableerror when computing gradients throughTanh.
This fix restores the expected gradient calculation for the tanh activation function.