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

Method __init__

test/python/test_model.py:111–119  ·  view source on GitHub ↗
(self, hidden_size)

Source from the content-addressed store, hash-verified

109class LSTMModel3(model.Model):
110
111 def __init__(self, hidden_size):
112 super(LSTMModel3, self).__init__()
113 self.lstm = layer.CudnnRNN(
114 hidden_size=hidden_size,
115 batch_first=True,
116 # return_sequences=True,
117 use_mask=True)
118 self.l1 = layer.Linear(2)
119 self.optimizer = opt.SGD(0.1)
120
121 def forward(self, x, seq_lengths):
122 y = self.lstm(x, seq_lengths=seq_lengths)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected