Beispiel #1
0
    def forward(self, x):
        # nb, np, 3 -> [nb, 3, np] x [nb, 1, np, na]
        x = M.preprocess_input(x, self.na_in, False)
        # x = M.preprocess_input(x, 1)

        for block_i, block in enumerate(self.backbone):
            x = block(x)

        x = self.outblock(x)
        return x
Beispiel #2
0
    def forward(self, x, rlabel=None):
        # nb, np, 3 -> [nb, 3, np] x [nb, 1, np, na]
        input_x = x
        x = M.preprocess_input(x, self.na_in, False)
        for block_i, block in enumerate(self.backbone):
            x = block(x)

        # x = self.outblock(x.feats, rlabel)
        x = self.outblock(x, rlabel)
        return x
Beispiel #3
0
    def forward(self, x):
        # nb, 2, np, 3 -> [nb, 3, np] x [nb, 1, np, na]
        x = torch.cat((x[:,0], x[:,1]),dim=0)

        x = M.preprocess_input(x, self.na_in, False)
        # x = M.preprocess_input(x, 1, False)

        for block_i, block in enumerate(self.backbone):
            x = block(x)

        f1, f2 = torch.chunk(x.feats,2,dim=0)
        x1, x2 = torch.chunk(x.xyz,2,dim=0)

        # confidence, quats = self.outblock(x.feats)
        confidence, quats = self.outblock(f1, f2, x1, x2)

        return confidence, quats