Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
Fix redeclared variable
Browse files Browse the repository at this point in the history
Fixed a bug where a node in an activation was re-declared, resuting in
an unused variable.
  • Loading branch information
samuelfneumann committed Sep 25, 2021
1 parent 8dc7e7f commit ca7e38a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion network/Activations.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ func Mish() *Activation {
// taken.
func Log1p() *Activation {
logFn := func(n *G.Node) (*G.Node, error) {
if n, err := G.Abs(n); err != nil {
var err error

if n, err = G.Abs(n); err != nil {
return nil, fmt.Errorf("log1p: could not compute absolute "+
"value: %v", err)
}
Expand Down

0 comments on commit ca7e38a

Please sign in to comment.