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

Method forward

SwissArmyTransformer/examples/yolos/models/detector.py:28–31  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

26 self.layers = nn.ModuleList(nn.Linear(n, k) for n, k in zip([input_dim] + h, h + [output_dim]))
27
28 def forward(self, x):
29 for i, layer in enumerate(self.layers):
30 x = F.relu(layer(x)) if i < self.num_layers - 1 else layer(x)
31 return x
32
33class Detector(nn.Module):
34 def __init__(self, num_classes, pre_trained=None, det_token_num=100, backbone_name='tiny', init_pe_size=[800,1344], mid_pe_size=None, use_checkpoint=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected