diff --git a/model.py b/model.py index 73d9d73..42ddca7 100644 --- a/model.py +++ b/model.py @@ -16,7 +16,7 @@ class FeatureExtractor(nn.Module): def __init__(self, reshape_size=224, pooling=False, verbose=False): super().__init__() - self.mobilenet = models.mobilenet_v2(pretrained=True) + self.mobilenet = models.mobilenet_v2(weights=models.MobileNet_V2_Weights) self.mobilenet = nn.Sequential(*list(self.mobilenet.children())[:-1]) # Remove the last classifier # average pooling @@ -131,7 +131,7 @@ class FastRCNN(nn.Module): # print(feat.shape) # perform RoI Pool & mean pool - feat=torchvision.ops.roi_pool(feat, torch.cat((proposal_batch_ids.unsqueeze(1), proposals),dim=1), output_size=(self.roi_output_w, self.roi_output_h)) + feat=torchvision.ops.roi_pool(feat, torch.cat((proposal_batch_ids.unsqueeze(1), proposals),dim=1), output_size=(self.roi_output_h, self.roi_output_w)) # print(feat.shape) feat=feat.mean(dim=[2,3]) # print(feat.shape) diff --git a/report.pdf b/report.pdf new file mode 100644 index 0000000..6792466 Binary files /dev/null and b/report.pdf differ diff --git a/视听导_编程作业2_说明文档.pdf b/视听导_编程作业2_说明文档.pdf deleted file mode 100644 index d3f9ae2..0000000 Binary files a/视听导_编程作业2_说明文档.pdf and /dev/null differ