HiddenState

scalation.modeling.forecasting.neuralforecasting.RNNCell.HiddenState
protected case class HiddenState(n_mem: Int, n_seq: Int, seq_length: Int, var param: TensorD = ..., var grad: TensorD = ..., var pre_act_grad: MatrixD = ...)

Case class representing the hidden state of the RNN.

Value parameters

grad

tensor for hidden state gradients

n_mem

number of memory units

n_seq

number of sequences

param

tensor for hidden state parameters

pre_act_grad

matrix for pre-activation gradients

seq_length

length of each sequence

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def reset(): Unit

Reset the hidden state parameters and gradients to zero.

Reset the hidden state parameters and gradients to zero.

Attributes

def slice(batch_size: Int): RNNCell.this.HiddenState

Return a new HiddenState with tensors sliced to the specified batch size.

Return a new HiddenState with tensors sliced to the specified batch size.

Value parameters

batch_size

The batch size to slice to

Attributes

Returns

A new HiddenState with sliced tensors

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product