MCPcopy Create free account
hub / github.com/apache/singa / __init__

Method __init__

test/python/test_model.py:146–159  ·  view source on GitHub ↗
(self, hidden_size, seq_length, batch_size, bidirectional,
                 num_layers, return_sequences, rnn_mode, batch_first)

Source from the content-addressed store, hash-verified

144class LSTMModel(model.Model):
145
146 def __init__(self, hidden_size, seq_length, batch_size, bidirectional,
147 num_layers, return_sequences, rnn_mode, batch_first):
148 super(LSTMModel, self).__init__()
149 self.hidden_size = hidden_size
150 self.seq_length = seq_length
151 self.return_sequences = return_sequences
152
153 self.lstm = layer.CudnnRNN(hidden_size=hidden_size,
154 num_layers=num_layers,
155 bidirectional=bidirectional,
156 return_sequences=return_sequences,
157 rnn_mode=rnn_mode,
158 batch_first=batch_first)
159 self.optimizer = opt.SGD(0.1)
160
161 def forward(self, x):
162 y = self.lstm(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected