MCPcopy Create free account
hub / github.com/ShengbenBi/CTSAC / forward

Method forward

SAC-robot-navigation-CL/SAC/SAC.py:82–89  ·  view source on GitHub ↗
(self, x, enc_output, tgt_mask=None, memory_mask=None)

Source from the content-addressed store, hash-verified

80 self.ln3 = nn.LayerNorm(embed_dim)
81
82 def forward(self, x, enc_output, tgt_mask=None, memory_mask=None):
83 self_attn_output, _ = self.self_attention(x, x, x, attn_mask=tgt_mask)
84 x = self.ln1(x + self_attn_output)
85 enc_dec_attn_output, _ = self.enc_dec_attention(x, enc_output, enc_output, attn_mask=memory_mask)
86 x = self.ln2(x + enc_dec_attn_output)
87 ff_output = self.ff(x)
88 x = self.ln3(x + ff_output)
89 return x
90
91class Decoder(nn.Module):
92 def __init__(self, embed_dim, n_blocks, n_heads, dropout):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected