(self,fea_dim)
| 8 | |
| 9 | class bBbox(torch.nn.Module): |
| 10 | def __init__(self,fea_dim): |
| 11 | super(bBbox, self).__init__() |
| 12 | self.img_dim = 4096 |
| 13 | self.attention1 = Attention(dim=128,heads=4) |
| 14 | self.attention2 = Attention(dim=128,heads=4) |
| 15 | |
| 16 | self.linear_img = nn.Sequential(torch.nn.Linear(self.img_dim, fea_dim),torch.nn.ReLU()) |
| 17 | |
| 18 | self.classifier = nn.Linear(fea_dim,2) |
| 19 | |
| 20 | def forward(self, **kwargs): |
| 21 | frames=kwargs['bbox_vgg'] |