Skip to content

Instantly share code, notes, and snippets.

@BloodAxe
Created August 19, 2020 08:37
Show Gist options
  • Save BloodAxe/dc515bdb2ef192bcdb439b2ca10e7abf to your computer and use it in GitHub Desktop.
Save BloodAxe/dc515bdb2ef192bcdb439b2ca10e7abf to your computer and use it in GitHub Desktop.
class RetinaNet(nn.Module):
RETINA_NET_OUTPUT_BBOXES = "bboxes"
RETINA_NET_OUTPUT_SCORES = "scores"
...
def forward(self, image):
x = self.encoder(image)
x = self.decoder(x)
bboxes, scores = self.head(x)
return { RETINA_NET_OUTPUT_BBOXES: bboxes,
RETINA_NET_OUTPUT_SCORES: scores }
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment