base_model#

SSD 300 resnet backbones in PyTorch adapted from MLCommons.

Based on MLCommons Reference Implementation here

Functions

Classes

Loss

Implements the loss as the sum of the followings:

ResNet18

Module ResNet18.

ResNet34

Module ResNet34.

class composer.models.ssd.base_model.Loss(dboxes)[source]#

Bases: torch.nn.modules.module.Module

Implements the loss as the sum of the followings:

  1. Confidence Loss: All labels, with hard negative mining

  2. Localization Loss: Only on positive labels

forward(ploc, plabel, gloc, glabel)[source]#

ploc, plabel: Nx4x8732, Nxlabel_numx8732 predicted location and labels.

gloc, glabel: Nx4x8732, Nx8732 ground truth location and labels