MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / __init__

Method __init__

sat/sgm/modules/encoders/traj_encoder.py:32–41  ·  view source on GitHub ↗
(self, dim, hidden_dim, dropout = 0.)

Source from the content-addressed store, hash-verified

30
31class FeedForward(nn.Module):
32 def __init__(self, dim, hidden_dim, dropout = 0.):
33 super().__init__()
34 self.net = nn.Sequential(
35 nn.LayerNorm(dim),
36 nn.Linear(dim, hidden_dim),
37 nn.GELU(),
38 nn.Dropout(dropout),
39 nn.Linear(hidden_dim, dim),
40 nn.Dropout(dropout)
41 )
42 def forward(self, x):
43 return self.net(x)
44

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected