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

Method forward

examples/rnn/imdb_model.py:43–49  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

41 self.l2 = layer.Linear(2)
42
43 def forward(self, x):
44 y = self.lstm(x)
45 y = autograd.reshape(y, (y.shape[0], -1))
46 y = self.l1(y)
47 y = autograd.relu(y)
48 y = self.l2(y)
49 return y
50
51 def train_one_batch(self, x, y):
52 out = self.forward(x)

Callers 1

train_one_batchMethod · 0.95

Calls 3

reshapeMethod · 0.45
l1Method · 0.45
l2Method · 0.45

Tested by

no test coverage detected