The spatial pooling operation spatially (i.e. acting only on width and height) combine information in a matrix or tensor. It is commonly used in Convolutional Neural Networks in the form of average pooling, max pooling, and sum pooling.
Questions tagged [spatial-pooling]
8 questions
7
votes
2 answers
hybrid of max pooling and average pooling
While tweaking a deep convolutional net using Keras (with the TensorFlow backend) I would like to try out a hybrid between MaxPooling2D and AveragePooling2D, because both strategies seem to improve two different aspects regarding my objective.
I'm…

Tobias Hermann
- 9,936
- 6
- 61
- 134
5
votes
1 answer
how to convert pytorch adaptive_avg_pool2d method to keras or tensorflow
I don't know how to convert the PyTorch method adaptive_avg_pool2d to Keras or TensorFlow. Anyone can help?
PyTorch mehod is
adaptive_avg_pool2d(14,[14])
I tried to use the average pooling, the reshape the tensor in Keras, but got the…

user10282036
- 321
- 2
- 5
- 13
4
votes
3 answers
How to perform sum pooling in PyTorch
How to perform sum pooling in PyTorch. Specifically, if we have input (N, C, W_in, H_in) and want output (N, C, W_out, H_out) using a particular kernel_size and stride just like nn.Maxpool2d ?

adeelz92
- 469
- 1
- 5
- 17
1
vote
1 answer
How to use pooling on rows, i.e: from (512, 20, 32) to (512, 10, 32)?
I have data with the shape: (512, 20, 32)
and I want to use AvgPool and get the shape of: (512, 10, 32).
I have tried with no success:
pool = nn.AvgPool1d(kernel_size=2, stride=2)
data = torch.rand(512, 20, 32)
out =…

user3668129
- 4,318
- 6
- 45
- 87
1
vote
2 answers
How to do tensorflow segment_max in high dimension
I want to be able to call tensorflow's tf.math.unsorted_segment_max
on a data tensor that is of size [N, s, K]. N is the number of channels and K is the number of filters/feature maps.
s is the size of one-channel data sample. I have segment_ids in…

Polhek
- 67
- 1
- 7
0
votes
0 answers
PrRoIPool vs RoIAlign with samling ratio 0 - Are they equivalent?
I had been trying to implement Precision roi pooling from this repository into my pytorch model. It turned out to be much harder than I anticipated so I ended up not using it. I read somewhere that Precision roi pooling does the same thing as Roi…

DoctorSnake
- 1
- 1
0
votes
1 answer
Spacial pyramid pooling in tensorflow with unknown shape
I would like to perform spacial pyramid pooling in tensorflow. This has already been answered there (and other questions in Stackoverflow.com), but the proposed solution doesn't work with unknown input shape.
Is there an implementation that handles…

Jav
- 1,445
- 1
- 18
- 47
0
votes
1 answer
Pool information based on the spatial location of survey locations within a spatial grid
I need to run a habitat use analysis using camera trap data within an occupancy framework. I have several camera locations (survey points) with repeated surveys throughout a period of 13 years. For occupancy analysis I need to have a sample grid and…

AnnK
- 189
- 1
- 10