Questions tagged [convolutional-neural-network]
257 questions
4
votes
1 answer
Keras 'Tensor' object has no attribute 'ndim'
I am trying to implement a siamese network (by using triplet loss method). I just cannot make it train. After many tries, I guess that I have my problem in the generator (where I prepare the input data stream for training) but I could not localize…
![](../../users/profiles/9328846.webp)
edn
- 1,315
- 2
- 14
- 41
4
votes
1 answer
keras - flow_from_directory function - target_size parameter
Keras has this function called flow_from_directory and one of the parameters is called target_size. Here is the explanation for it:
target_size: Tuple of integers (height, width), default: (256, 256).
The dimensions to which all images found will…
![](../../users/profiles/9328846.webp)
edn
- 1,315
- 2
- 14
- 41
4
votes
1 answer
Regression Activation Mapping for a given CNN
This paper https://arxiv.org/pdf/1703.10757.pdf disucces using Regression Activation Mapping (RAM) - instead of Class Activation Mapping (CAM). There are several articles describing how to implement CAM. But i cant find any for RAM - or the code…
![](../../users/profiles/2707144.webp)
Endre Moen
- 474
- 1
- 4
- 16
4
votes
3 answers
Keras ImageDataGenerator flow directory with 3D CNN data format error?
I am new in Keras, I have a dataset with multiple folders each indicates to a specific class. I used ImageDataGenerator to read the data from the subfolders.
I am trying to use 16 consecutive frames with size 80x100 so the input_shape is (16, 80,…
![](../../users/profiles/7262249.webp)
Meme
- 55
- 1
- 7
4
votes
2 answers
pytorch cnn stride error
I am now using pytorch 0.4.0 in windows to build a CNN and here is my code:
class net(nn.Module):
def __init__(self):
super(net, self).__init__()
self.conv1 = nn.Conv2d(in_channels=1, out_channels=16, kernel_size=(1,3),stride=1…
![](../../users/profiles/9713286.webp)
Ddj
- 41
- 2
4
votes
1 answer
Visualization of the filters of VGG16
I am learning CNN, right now, working on deconvolution of the layers. I have begun the process of learning upsampling and observe how convolution layers see the world by generating feature maps from the filters from the source Visualization of the…
![](../../users/profiles/1601903.webp)
sana
- 410
- 2
- 6
- 22
4
votes
1 answer
Monte Carlo (MC) dropout in Keras with R
How to implement Monte Carlo dropout with Keras in Convolutional neural networks to estimate predictive uncertainty as suggested by YARIN GAL? I am using R.R-Code is here
I am fitting the model in small batches and want to evaluate the model in…
![](../../users/profiles/9276753.webp)
Ehtasham Billah Mymun
- 101
- 7
4
votes
1 answer
Adding visualization for every layer activation layer of Convolution Network - Keras
I have a Convolution Network (CNN) as followed. I would like to add visualization for every layer activation layer as in the
There are several layer of the CNN that are doing the required task. I only want to probe the output of each layer.
def…
![](../../users/profiles/4406532.webp)
Avi
- 2,023
- 3
- 25
- 44
4
votes
2 answers
Conv2D: How can I get the values of each filter
My model:
classifier = Sequential()
# Convolutional + MaxPooling -> 1
classifier.add(Conv2D(32, (3,3), input_shape = (IMAGE_SIZE, IMAGE_SIZE, 3)))
convout1 = Activation('relu')
classifier.add(convout1)
classifier.add(MaxPooling2D(pool_size =…
![](../../users/profiles/6115065.webp)
Nishit Mehta
- 63
- 5
3
votes
1 answer
Training a classifier on Human pose estimation
Project description-I am planning to do a project in which I have to recognize various human actions such as yawning,sleeping,walking,etc.To do this I need features on human poses which can be done with human pose estimation. After training the…
![](../../users/profiles/7112948.webp)
clarky
- 309
- 1
- 4
- 15
3
votes
4 answers
Pytorch inceptionV3 transfer learning gives error - max() received an invalid combination of arguments
The program for transfer learning inception_v3 in pytorch that i am using is here : https://drive.google.com/file/d/1zn4z7nOp_wJne0En6zq4WJfwHVVftERT/view?usp=sharing
I am getting the following error upon running the program :
Epoch 0/24
…
![](../../users/profiles/6612871.webp)
Harshit Nagar
- 178
- 1
- 14
3
votes
1 answer
why not use the max value of output tensor instead of Softmax Function?
I built a CNN model on images one-class classification.
The output tensor is a list which has 65 elements. I make this tensor input to Softmax Function, and got the classified result.
I think the max value in this output tensor is the classified…
![](../../users/profiles/7787579.webp)
Li Shihao
- 35
- 4
3
votes
2 answers
Conv2D transpose output shape using formula
I get [-1,256,256,3] as the output shape using the transpose layers shown below. I print the output shape. My question is specifically about the height and width which are both 256. The channels seem to be the number of filters from the last…
![](../../users/profiles/1234909.webp)
Mohan Radhakrishnan
- 2,410
- 4
- 19
- 36
3
votes
1 answer
ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, but got array with shape (8020, 1)
I am trying to build an image classifier but im running in to the error as mentioned in the title of this post. Below is the code im working on. How do i convert my numpy array that is of shape (8020,) to the shape as required by the function fit()?…
![](../../users/profiles/2520416.webp)
redwolf_cr7
- 1,199
- 4
- 18
- 28
3
votes
1 answer
Can I use rectangle images with a convolution neural network in Keras?
Say I'd like to use Keras's Convolutional2D function to build a CNN, can the input image be of size [224, 320, 3] instead of something like [224, 224, 3]?
Should I keep my images in their rectangle format or scale them to be square? I've tried…
![](../../users/profiles/7900723.webp)
Daniel Bourke
- 321
- 7
- 11