Follow Figure 1 (right) for connections.
(self, x, memory)
| 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 | |
| 179 | class ShallowCNN(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected