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

Commit

Permalink
Update gobable activations
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelfneumann committed Sep 24, 2021
1 parent 8815fa3 commit 5b8842c
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion network/Activations.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,36 @@ func (a *Activation) GobDecode(encoded []byte) error {
switch decoded {
case relu:
*a = *ReLU()

case identity:
*a = *Identity()

case tanh:
*a = *TanH()

case sigmoid:
*a = *Sigmoid()

case sin:
*a = *Sin()

case cos:
*a = *Cos()

case sqrt:
*a = *Sqrt()

case mish:
*a = *Mish()

case logarithm:
*a = *Log()

case softplus:
*a = *Softplus()

default:
return fmt.Errorf("gobdecode: illegal Activation type")
return fmt.Errorf("unmarshalJSON: illegal Activation type")
}
return nil
}
Expand Down

0 comments on commit 5b8842c

Please sign in to comment.