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

Method __init__

test/python/test_model.py:130–138  ·  view source on GitHub ↗
(self, hidden_size, bidirectional, num_layers)

Source from the content-addressed store, hash-verified

128class LSTMModel2(model.Model):
129
130 def __init__(self, hidden_size, bidirectional, num_layers):
131 super(LSTMModel2, self).__init__()
132 self.lstm = layer.CudnnRNN(hidden_size=hidden_size,
133 num_layers=num_layers,
134 bidirectional=bidirectional,
135 return_sequences=False,
136 rnn_mode='lstm',
137 batch_first=True)
138 self.optimizer = opt.SGD(0.1)
139
140 def forward(self, x):
141 return self.lstm(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected