Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RNN ¶
type RNN struct {
// contains filtered or unexported fields
}
RNN represents the neural network This RNNs parameters are the three mat64rices whh, wxh, why. hprev is the last known hidden vector, which is actually the memory of the RNN bh, and by are the biais vectors respectivly for the hidden layer and the output layer
func NewRNN ¶
NewRNN creates a new RNN with input size of x, outputsize of y and hidden dimension of h The hidden state h is initialized with the zero vectornn. func newRNN(x, y, h int) *RNN {
func (*RNN) Predict ¶
Predict n element of output that corresponds to the input xs At every iteration, the output is processed by the adapt function
func (*RNN) Train ¶
func (rnn *RNN) Train() (chan<- TrainingSet, <-chan float64)
Train the network. The train mechanisme is launched in a seperate go-routine it is waiting for an input to be sent in the feeding channel
type TrainingSet ¶
TrainingSet represents an input mat64rix and the expected result when passed through a rnn