Documentation
¶
Overview ¶
Package recurrent provides recurrent neural network layers.
Stability: beta
Index ¶
- type SimpleRNN
- func (r *SimpleRNN[T]) Attributes() map[string]interface{}
- func (r *SimpleRNN[T]) Backward(ctx context.Context, mode types.BackwardMode, ...) ([]*tensor.TensorNumeric[T], error)
- func (r *SimpleRNN[T]) Forward(ctx context.Context, inputs ...*tensor.TensorNumeric[T]) (*tensor.TensorNumeric[T], error)
- func (r *SimpleRNN[T]) OpType() string
- func (r *SimpleRNN[T]) OutputShape() []int
- func (r *SimpleRNN[T]) Parameters() []*graph.Parameter[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleRNN ¶
SimpleRNN is a simple recurrent neural network layer.
func NewSimpleRNN ¶
func NewSimpleRNN[T tensor.Numeric]( name string, engine compute.Engine[T], ops numeric.Arithmetic[T], inputDim, hiddenDim int, ) (*SimpleRNN[T], error)
NewSimpleRNN creates a new SimpleRNN layer.
func (*SimpleRNN[T]) Attributes ¶
Attributes returns the attributes of the layer.
func (*SimpleRNN[T]) Backward ¶
func (r *SimpleRNN[T]) Backward(ctx context.Context, mode types.BackwardMode, outputGradient *tensor.TensorNumeric[T], inputs ...*tensor.TensorNumeric[T]) ([]*tensor.TensorNumeric[T], error)
Backward computes the gradients.
func (*SimpleRNN[T]) Forward ¶
func (r *SimpleRNN[T]) Forward(ctx context.Context, inputs ...*tensor.TensorNumeric[T]) (*tensor.TensorNumeric[T], error)
Forward computes the forward pass of the layer.
func (*SimpleRNN[T]) OutputShape ¶
OutputShape returns the output shape of the layer.
func (*SimpleRNN[T]) Parameters ¶
Parameters returns the parameters of the layer.
Click to show internal directories.
Click to hide internal directories.