35308f48创建于 2022年8月11日历史提交
--- inceptionv4.py	2022-08-11 09:14:49.845296811 +0000
+++ inceptionv4_modify.py	2022-08-11 09:14:17.981295672 +0000
@@ -299,7 +299,7 @@
 
     def logits(self, features):
         #Allows image of any size to be processed
-        adaptiveAvgPoolWidth = features.shape[2]
+        adaptiveAvgPoolWidth = features.shape[2].item()
         x = F.avg_pool2d(features, kernel_size=adaptiveAvgPoolWidth)
         x = x.view(x.size(0), -1)
         x = self.last_linear(x)