File "/home/wj/60deepfake/github/multiple-attention-master/models/MAT.py", line 378, in forward
x=self.pooling(feature_maps)
......
File "/home/wj/anaconda3/envs/video/lib/python3.8/site-packages/torch/nn/functional.py", line 1129, in adaptive_avg_pool2d
_output_size = _list_with_default(output_size, input.size())
AttributeError: 'tuple' object has no attribute 'size'
I find that feature_maps is obtained from class 'Texture_Enhance_v2'.
self.pooling=nn.AdaptiveAvgPool2d(1)
self.texture_enhance=Texture_Enhance_v2(num_features,1)
......
feature_maps=self.texture_enhance(feature_maps,(0.2,0.2))
x=self.pooling(feature_maps)
The output of the class 'Texture_Enhance_v2' is a tuple ( "return feature_maps,feature_maps_d" ).
The pooling operation can not deal with tuple data.