Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ntm.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ type SGDMomentum struct {
PrevD []float64
}

// NewSDGMomentun creates a new instance of a stochastic gradient descent with momentum object with the
// Controller object passed as an argument and a new slice as the PrevD with the length of the controllers
// Weights Values
func NewSGDMomentum(c Controller) *SGDMomentum {
s := SGDMomentum{
C: c,
Expand Down Expand Up @@ -312,6 +315,7 @@ type RMSProp struct {
D []float64
}

// NewRMSProp creates a new instance of the rmsprop algorithm based on the controller given as an argument
func NewRMSProp(c Controller) *RMSProp {
r := RMSProp{
C: c,
Expand Down
1 change: 1 addition & 0 deletions unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type Unit struct {
Grad float64 // gradient at node
}

// String prints the value and gradient at a node in a neural network
func (u Unit) String() string {
return fmt.Sprintf("{%.3g %.3g}", u.Val, u.Grad)
}
Expand Down