MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / __init__

Method __init__

imperative/python/megengine/module/rnn.py:105–113  ·  view source on GitHub ↗
(
        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

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected