Questions tagged [max-pooling]

For questions about max pooling (as well as average pooling) operation, commonly used in convolutional neural networks for downsampling.

122 questions
3
votes
0 answers

(Faster R-CNN) ROI Pooling layer is not differentiable w.r.t the box coordinates

The paper reports that "having an RoI pooling layer that is differentiable w.r.t the box coordinates is a nontrivial problem" and refers to "ROI Warping" (crops and resizes the features to a fixed shape) that makes it fully differentiable w.r.t the…
Austin
  • 31
  • 1
3
votes
1 answer

What is the desired behavior of average pooling with padding?

Recently I've trained a neural network using pytorch and there is an average pooling layer with padding in it. And I'm confused about the behavior of it as well as the definition of average pooling with padding. For example, if we have a input…
3
votes
1 answer

Pooling over channels in pytorch

In tensorflow, I can pool over the depth dimension which would reduce the channels and leave the spatial dimensions unchanged. I'm trying to do the same in pytorch but the documentation seems to say pooling can only be done over the height and width…
Judy T Raj
  • 1,298
  • 1
  • 14
  • 33
3
votes
1 answer

MinimumPooling in Keras

I have only found MaxPooling2D and AveragePooling2D in keras with tensorflow backend. Have been looking for MinimumPooling2D. This github link suggests to use something like this for minimum pooling (pool2d(-x)) I get an error while using a negative…
Mahmud Sabbir
  • 321
  • 1
  • 2
  • 7
3
votes
1 answer

Does omitting pooling layers in CNNs make sense in some cases?

I know that a usual CNN consists of both convolutional and pooling layers. Pooling layers make the output smaller which means less computations and they also make it somehow transform invariant, so the position of the feature from the kernel filter…
3
votes
1 answer

keras vgg 16 shape error

im trying to fit the data with the following shape to the pretrained keras vgg19 model. image input shape is (32383, 96, 96, 3) label shape is (32383, 17) and I got this error expected block5_pool to have 4 dimensions, but got array with shape…
2
votes
0 answers

All values replaced with pool max in pytorch

Given z equal to tensor([[[[0.0908, 0.1286, 0.6942, 0.5161], [0.4227, 0.2154, 0.5990, 0.8666], [0.3009, 0.2399, 0.1818, 0.7551], [0.2396, 0.4485, 0.4027, 0.5303]], [[0.8251, 0.7457, 0.2091, 0.7313], …
2
votes
1 answer

Upsampling with pooling indices keras (unpooling)

I start by saying that I'm kinda new to deep learning I'm trying to write a segnet in keras that uses pooling indices to upsample. I'm using this function with a Lambda Layer to perform a max pooling and save pooling indices: def pool_argmax2D(x,…
2
votes
1 answer

AttributeError: module 'keras.backend' has no attribute 'set_image_dim_ordering'

model = Sequential() K.set_image_dim_ordering('th') model.add(Convolution2D(30, 5, 5, border_mode= 'valid' , input_shape=(1, 10, 10),activation= 'relu' )) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Convolution2D(15, 3, 3, activation= 'relu'…
2
votes
5 answers

What is K Max Pooling? How to implement it in Keras?

I have to add a k-max pooling layer in CNN model to detect fake reviews. Please can you let me know how to implement it using keras. I searched the internet but I got no good resources.
Avik Nayak
  • 21
  • 1
  • 3
2
votes
0 answers

significance of max pooling in lstm for sentiment Analysis

Can someone explain significance of max pooling layer after lstm layer in case of sentiment analysis? How does it improves encoding of whole sentence in case of just considering output of final time step vs output of max pooling?
2
votes
1 answer

Keras max_pool3d got an expected keyword argument 'data_format'

I am running a workshop with students using Keras, and all of the students have the same anaconda3 installation in windows. The following code is giving an error for most of the students except 2 of them: import numpy as np import matplotlib.pyplot…
2
votes
3 answers

Usage of argmax from tf.nn.max_pool_with_argmax tensorflow

I am trying to use the argmax result of tf.nn.max_pool_with_argmax() to index another tensor. For simplicity, let's say I am trying to implement the following: output, argmax = tf.nn.max_pool_with_argmax(input, ksize, strides,…
Mathew
  • 199
  • 11
2
votes
1 answer

Issues Training CNN with Prime number input dimensions

I am currently developing a CNN model with Keras (an autoencoder). This type my inputs are of shape (47,47,3), that is a 47x47 image with 3 (RGB) layers. I have worked with some CNN's in the past, but this time my input dimensions are prime numbers…
DarkCygnus
  • 5,985
  • 3
  • 33
  • 52
2
votes
1 answer

How to create a neural network that has a dynamic input?

This question is a tough one: How can I feed a neural network, a dynamic input? Answering this question will certainly help the advance of modern AI using deep learning for applications other than computer vision and speech recognition. I will…
1
2
3
8 9