ssd.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:realtime-action-detection 作者: gurkirt 项目源码 文件源码
def __init__(self, base, extras, head, num_classes):
        super(SSD, self).__init__()

        self.num_classes = num_classes
        # TODO: implement __call__ in PriorBox
        self.priorbox = PriorBox(v2)
        self.priors = Variable(self.priorbox.forward(), volatile=True)
        self.num_priors = self.priors.size(0)
        self.size = 300

        # SSD network
        self.vgg = nn.ModuleList(base)
        # Layer learns to scale the l2 normalized features from conv4_3
        self.L2Norm = L2Norm(512, 20)
        self.extras = nn.ModuleList(extras)

        self.loc = nn.ModuleList(head[0])
        self.conf = nn.ModuleList(head[1])

        self.softmax = nn.Softmax().cuda()
        # self.detect = Detect(num_classes, 0, 200, 0.001, 0.45)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号