Method
__init__
(
self,
input_size: int,
hidden_size: int,
bias: bool = True,
nonlinearity: str = "tanh",
)
Source from the content-addressed store, hash-verified
| 103 | """ |
| 104 | |
| 105 | def __init__( |
| 106 | self, |
| 107 | input_size: int, |
| 108 | hidden_size: int, |
| 109 | bias: bool = True, |
| 110 | nonlinearity: str = "tanh", |
| 111 | ) -> None: |
| 112 | self.nonlinearity = nonlinearity |
| 113 | super(RNNCell, self).__init__(input_size, hidden_size, bias, num_chunks=1) |
| 114 | |
| 115 | def forward(self, input: Tensor, hx: Optional[Tensor] = None) -> Tensor: |
| 116 | if hx is None: |
Callers
nothing calls this directly
Tested by
no test coverage detected