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

Method forward

SAC-robot-navigation-CL/SAC/SAC.py:50–55  ·  view source on GitHub ↗
(self, x, src_mask=None)

Source from the content-addressed store, hash-verified

48 self.ln2 = nn.LayerNorm(embed_dim)
49
50 def forward(self, x, src_mask=None):
51 attn_output, _ = self.attention(x, x, x, attn_mask=src_mask)
52 x = self.ln1(x + attn_output)
53 ff_output = self.ff(x)
54 x = self.ln2(x + ff_output)
55 return x
56
57class Encoder(nn.Module):
58 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