MCPcopy Create free account
hub / github.com/chibohe/text_recognition_toolbox / forward

Method forward

networks/SATRN.py:171–176  ·  view source on GitHub ↗

Follow Figure 1 (right) for connections.

(self, x, memory)

Source from the content-addressed store, hash-verified

169 self.sublayer = clones(SublayerConnection(size, dropout), 3)
170
171 def forward(self, x, memory):
172 "Follow Figure 1 (right) for connections."
173 m = memory
174 x = self.sublayer[0](x, lambda x: self.self_attn(x, x, x))
175 x = self.sublayer[1](x, lambda x: self.src_attn(x, m, m))
176 return self.sublayer[2](x, self.feed_forward)
177
178
179class ShallowCNN(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected