For questions about max pooling (as well as average pooling) operation, commonly used in convolutional neural networks for downsampling.
Questions tagged [max-pooling]
157 questions
1
vote
0 answers
Fractional maxpool makes runtime die on google colab
So I am trying to use fractional max pool in Keras with Lambda wrappers on CIFAR-10,but whenever I try to train the model the runtime dies. Any clues on what's happening? I am using Keras v2.0 with tensorflow backend.
def frac_max_pool(x):
return…

Sid
- 71
- 1
- 1
- 7
1
vote
1 answer
IndexError: tuple index out of range by max pooling
I am using keras functional api and I have tensor of shape
phrasing.shape = (?, 553777, 19, 3)
Now I want to take a max feature of unigram and bigram & trigram
so the expected shape should be
(?, 553777, 19, 1)
so I added this line
ph =…

addam
- 11
- 2
1
vote
1 answer
Understanding output of Convolutional Neural Network
I have been trying to understand Convolutional Neural Network but I mess up with its output size.
The Formula is pretty much straightforward but I still end up confusing myself. I have learned from many sources on the Internet like deeplearning.ai…

vidit02100
- 153
- 13
1
vote
1 answer
How to use a tensorflow session inside a nerual network model
I was following along with a sentdex tutorial on writing a constitutional neural network and I got to wondering if I could figure out my own pooling layer. The problem is that as part of this pooling layer I have to perform a tensorflow function…

Dean Alvarez
- 25
- 4
1
vote
1 answer
maxpooling of channels in CNN
I need to decrease the number of channels in CNN network. my input is a 4D object (samples, rows, column, channels). number of channels is 3 and my output for training has just one channel. is there anyway to do kind of max-pooling in channel…

Vahid_g
- 49
- 1
- 7
1
vote
1 answer
merge multiple keras max pooling layers
I am new to keras.
My goal is to have total of 4 max pooling layers. All of them take same input with shape (N, 256). The first layer does global max pooling and give 1 output. The second layer with N / 2 pooling size and N / 2 stride, gives 2…

jiashenC
- 1,812
- 2
- 16
- 31
1
vote
0 answers
matcovnet pooling_cup.cpp pooling_backward_cpu function parameters
Hi I am trying to write a new pooling layer in matcovnet. I tried with Matlab code but it is way too much slow, so now I am trying to implement with cpp code. I am trying to use pooling_cup.cpp code to implement my work. But I am confused with…

Cpt. Price
- 71
- 2
- 8
1
vote
2 answers
NumPy Array Reshaped but how to change axis for pooling?
I have a 8x8 matrix as follows:
[[ 0.3 0.3 0.3 0.3 0.3 0.5 0.1 -0.1]
[ 0.1 0.1 -0.1 0.3 0.3 -0.1 -0.1 -0.5]
[-0.1 0.1 0.3 -0.1 0.3 -0.1 -0.1 -0.1]
[-0.1 0.1 0.5 0.3 -0.3 -0.1 -0.3 -0.1]
[ 0.5 0.1 -0.1 0.1 -0.1 -0.1 -0.3 -0.5]
[…

Azeem Ullah
- 125
- 1
- 3
- 12
1
vote
1 answer
What is the equivalent of Caffe's Maxpooling in tensorflow?
I am confused how we define max-pooling in Tensorflow. The documentation is vague and does not explain the parameters well.
In the pooling documentation it only says:
ksize: A list of ints that has length >= 4. The size of the window for
each…

Hossein
- 24,202
- 35
- 119
- 224
0
votes
0 answers
Why is the layernorm after the max operation so important?
I am using several residual blocks and then following the head part the model. I tried two different architectures and found that the models can be different from each other via existence of the layer normalization.
The is my model structures
input…

dreamg
- 1
- 2
0
votes
0 answers
How do I create a binaryMask that displays all the values which contributed to the output
I've been trying to implement a MaxPoolingLayer in numpy. The problem I'm having is that I cannot create an array that contains all the indices of the max Values(which I obviously need for the backward pass). My Idea is to create said array as some…

FalkAurel
- 1
- 2
0
votes
1 answer
CNN Issues with Max Pooling
I have a dataset of 40X40X7 images. I have the following model architecture and implementation.
def conv_block(inputs, n_filter, regularizer, common_args):
x = tf.keras.layers.Conv2D(filters=n_filter,
…

riskiem
- 187
- 2
- 7
0
votes
0 answers
Implementing Aggregator Neural Networks with TensorFlow 2.0
I am attempting to design a neural network model using Tensorflow with the following specifications:
The model accepts two inputs: X, a list of n 3-dimensional vectors, and Y, a list of n ascending natural numbers starting from 0. It produces an…

Nitesh Kumar
- 1
- 2
0
votes
0 answers
Fixing "Found an invalid max index" error in PyTorch's max_unpool2d function
I'm having a hard time using F.max_unpool2d in PyTorch. I define a tensor x, perform max pooling on it using nn.MaxPool2d and store the output and indices in y and indices. Then, I try to unpool y using F.max_unpool2d.
Here is the minimal…

Blade
- 984
- 3
- 12
- 34
0
votes
0 answers
calculating the receptive field of a network
I need to calculate the receptive field of a model like this one:
Conv2D(filters=4, kernel_size=5, strides=2, padding="same"),
ReLU(),
MaxPoling2D(pool_size=2),
Conv2D(filters=8, kernel_size=3, padding="same"),
ReLU(),
GlobalAveragePooling2D(),…

Skynet
- 1
- 2