amazon-science / patchcore-inspection

Apache License 2.0
691 stars 142 forks source link

about the meanmapper, aggregation of the neighborhood of patchsize 3 #101

Open wu33learn opened 2 months ago

wu33learn commented 2 months ago

hello, i am confused anbout the meanmaper, the input : layer 2: (B784, 1, 51233) layer3: (B784, 1, 102433), meanmaper: F.adaptive_average_pooling(input,1024), it is right for the layer 3 form 102433 to 1024 that is local aggregation of neighboord with patchsize 3, while the layer2 , i am confused, 51233 average pool to 1024, that seems unequal to the former, only 5 in a patch 9 be aggregrated to average, and that is computed twice to get two output in a neighborhood, so that the dimension matchs with former 1024. i am wondering if we can make 51233 to 512 and then interpolate to 1024, that makes use of the whole neighboreed information. looking forward to your reply!