AdaptiveAvgPool is applied to each feature map on the same scale due to feature[0].shape[-2:]
This means that nothing happens to the feature maps.
If you want to rescale the second feature maps to the first, I guess you could use features[0].shape[-2:]
Furthermore, even if you would use the suggestion above, you still don't apply any aggregation function f_agg to the first feature maps (as described in the paper). Shouldn't you use AvgPool2d in order to actually aggregate information from nearby patches?
https://github.com/hcw-00/PatchCore_anomaly_detection/blob/ded157b8546bd71338b89a47d6ee5a872f382b14/train.py#L295
AdaptiveAvgPool is applied to each feature map on the same scale due to
feature[0].shape[-2:]
This means that nothing happens to the feature maps.If you want to rescale the second feature maps to the first, I guess you could use
features[0].shape[-2:]
Furthermore, even if you would use the suggestion above, you still don't apply any aggregation function
f_agg
to the first feature maps (as described in the paper). Shouldn't you use AvgPool2d in order to actually aggregate information from nearby patches?