Questions tagged [filters]

For questions related to the filters (also known as kernels) of a convolutional layer (of a convolutional neural network) or, in general, used in a convolution operation. If you are looking for kernel functions (for example, used in the context of Gaussian processes or SVMs), you use the tag "kernel-functions".

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

Seeking Advice on Local AI Model for Analyzing Personal Files

I'm embarking on a project to develop an application for personal use that can assist me in retrieving specific information from my files. I'd like to be able to ask questions like "What was my ...
NoNam4's user avatar
  • 101
1 vote
1 answer
51 views

Which face filter algorithms can work on CPU or integrated GPU?

I see many realtime face swap filters and appearance enhancement filters on smartphone apps. Even apps that can make you look like a granny or show you having a frown, no matter what your actual ...
Julia's user avatar
  • 113
0 votes
1 answer
35 views

How to deactivate kernels from a trained CNN model

I trained a 1 layer CNN model with 128 3x3 kernels. I evaluated the model with a prescribed test data set and now I want to evaluate the performance of this model where we only consider select kernels ...
Humberto M. Peña's user avatar
0 votes
0 answers
47 views

Learned kernels in CNN seem just random patterns

I am training a classification neural network using Tensorflow2 (specifications below). The training goes well (good accuracy and no overfitting, apparently). During the training I monitor the learned ...
firion's user avatar
  • 269
2 votes
1 answer
328 views

How to calculate number of connected neurons with filter

let's say I have a conv layer i with 64 feature maps and a filter size of 3x3. The previous conv layer i-1 has 32 feature map. Step-size is 2 and padding 1. My question is now how to know how many ...
Haidepzai's user avatar
  • 131
0 votes
1 answer
104 views

CNNs: What does "number of filters" mean?

I understand how depth, kernel size, stride, and padding works when dealing with filters in a spatial convolution layer. What I don't understand is "the number of filters". Does that mean ...
Darren Rahnemoon's user avatar
0 votes
0 answers
24 views

Given the high resolution signal and the low pass filter (kaiser filter), is there a way to reconstruct the low resolution signal?

When we upsampling a discrete 1d signal by 2x, we first interleave the signal by 0, then pass through a low pass filter. low resolution signal [x1, x2, x3, x4] -> interleave 0 -> [x1, 0, x2, 0, ...
Zongze Wu's user avatar
  • 101
0 votes
1 answer
64 views

Is there any subtle difference between kernel and filter in the context of neural netowrks?

Consider the following excerpt from a paragraph, taken from the topic Detecting features with convolutions of the textbook named Deep Learning with PyTorch by Eli Stevens et al., regarding ...
hanugm's user avatar
  • 3,612
1 vote
1 answer
109 views

Graph Convolutional Networks: why are non-parametric filters not localized in space?

I was reading the following paper here about some of the groundwork in graph deep learning. On page 3, in the bit entitled Polynomial parameterization for localized filters, it states that non-...
Rocky the Owl's user avatar
1 vote
0 answers
86 views

FCNs: Questions about the filter rarefaction in the CVPR paper [Long et al., 2015]

I am reading the paper about the fully convolutional network (FCN). I had some questions about the part where the authors discuss the filter rarefaction technique (I guess this is roughly equivalent ...
scho's user avatar
  • 11
1 vote
1 answer
496 views

Is it possible to have different channel dimensions in a CNN?

Let's say I have two channels that I wish to feed into a CNN. One of the channel contains 4 traces and has a width of 512. Stacking them on top of each other therefore yields an image with dimensions (...
Sigfrid Stjärnholm's user avatar
1 vote
1 answer
510 views

Given an input of shape $(3, 32, 32)$, which is convolved with a $(3 \times 3)$ kernel, how do I calculate the FLOPS?

I have an input tensor of shape $\mathbf{(3, 32, 32)}$ consisting of 3 channels, 16 rows, and 16 columns. I want to convolve the input tensor using $\mathbf{(3 \times 3)}$ kernel/filter. How can I ...
Mhasan502's user avatar
0 votes
0 answers
80 views

What is the significance behind having small kernel sizes over having one large kernel size that covers the entire input in a CNN?

I have hardly ever seen anyone cover the entire input image with a filter of the same dimensions. I was wondering why that is the case, and if the performance in say, an image detection application ...
hridayns's user avatar
  • 233
0 votes
1 answer
245 views

Is "kernel" different from "filter" in convolutional neural networks?

Recently I asked a question on how a convolution 2d layer changes an RGB image into a grayscale image. Assume that our task is to convert an RGB image into a grayscale image. I use to believe that ...
hanugm's user avatar
  • 3,612
3 votes
0 answers
2k views

What is the fundamental difference between max pooling and adaptive max pooling used in PyTorch

PyTorch provides max pooling and adaptive max pooling. Both, max pooling and adaptive max pooling, is defined in three dimensions: 1d, 2d and 3d. For simplicity, I am discussing about 1d in this ...
hanugm's user avatar
  • 3,612
0 votes
2 answers
54 views

Is pruning only applicable to convolutional neural networks?

This article talks about pruning in the context of convolutional neural networks: One of the first methods of pruning is pruning entire convolutional filters. Using an L1 norm of the weight of all ...
user366312's user avatar
4 votes
1 answer
520 views

Are these visualisations the filters of the convolution layer or the convolved images with the filters?

There are several images related to convolutional networks on the Internet, an example of which I have given below My question is: are these images the weights/filters of the convolution layer (the ...
Ali.kavari76's user avatar
2 votes
1 answer
664 views

Is it a good idea to use different width and height of the kernel in a CNN?

I always see that the width and height of the kernel are the same. But is it a good idea to use different numbers? Recently I tried to use GoogLeNet (which expects images to be 224x224) on my images (...
user avatar
4 votes
0 answers
85 views

Visualizing the Loss Landscape of Neural Nets: Meaning of the word 'filter'?

I found myself scratching my head when I read the following phrase in the paper Visualizing the Loss Landscape of Neural Nets: To remove this scaling effect, we plot loss functions using filter-wise ...
hijit's user avatar
  • 41
2 votes
0 answers
34 views

Do filters have as many layers as the depth of the input in CNNs? [duplicate]

Firstly as an example here is the architecture of YOLOv2 I am trying to understand the depth of an output of a convolutional layer. For example, the first convolutional layer has the shape 3x3x32. So ...
Reactionic's user avatar
2 votes
0 answers
218 views

How will the filter size affect the transpose convolution operation?

After a series of convolutions, I am up-sampling a compressed representation, I was curious what is the methodology I should follow to choose an optimum kernel size for up-sampling. How will the ...
Vortex's user avatar
  • 51
4 votes
1 answer
482 views

Is there anything that ensures that convolutional filters don't end up the same?

I trained a simple model to recognize handwritten numbers from the mnist dataset. Here it is: ...
mark mark's user avatar
  • 763
1 vote
1 answer
2k views

What is the difference between Attention Gate and CNN filters?

Attention models/gates are used to focus/pay attention to the important regions. According to this paper, the authors describe that a model with Attention Gate (AG) can be trained from scratch. Then ...
Prasanjit Rath's user avatar
0 votes
1 answer
324 views

In CNNs, why do we sum the filter derivatives w.r.t the loss function to get the final gradient?

In a Convolutional Neural Network, unlike the fully connected layers, the same filter is used multiple times on the input while convolving - so during backpropagation, we get multiple derivatives for ...
Manu Soman's user avatar
2 votes
2 answers
2k views

What is the need for so many filters in a CNN?

Consider the following coding line related to CNNS Conv2D(64, (3,3), strides=(2, 2), padding='same') It is a convolution layer with filter size $3 \times 3$ and ...
hanugm's user avatar
  • 3,612
1 vote
2 answers
597 views

Does replacing 3x3 filters with 3x1 and 1x3 filters improve the performance?

Recently I have come up with a VGG16 model for my binary classification task. I have relatively simple signal images Therefore (maybe?) other deeper models like ...
bit_scientist's user avatar
1 vote
2 answers
224 views

How to construct input dependent convolutional filter?

I am constructing a convolutional variational autoencoder for images, starting out with mnist digits. Typically I would specify convolutional layers in the following way: ...
Jane Sully's user avatar
3 votes
1 answer
962 views

What is the intuition behind the number of filters/channels for each convolutional layer?

After having chosen the number of layers for a convolutional neural network, we must also choose the number of filters/channels for each convolutional layer. The intuition behind the filter's spatial ...
yuri's user avatar
  • 33
3 votes
0 answers
70 views

What does "convolve k filters" mean in the AlphaGo paper?

On page 27 of the DeepMind AlphaGo paper appears the following sentence: The first hidden layer zero pads the input into a $23 \times 23$ image, then convolves $k$ filters of kernel size $5 \times 5$ ...
William Ehlhardt's user avatar
1 vote
3 answers
243 views

How can I implement 2D CNN filter with channelwise-bound kernel weights?

I would like to bind kernel parameters through channels/feature-maps for each filter. In a conv2d operation, each filter consists of HxWxC parameters I would like to have filters that have HxW ...
petsol's user avatar
  • 11
4 votes
1 answer
370 views

Do all filters of the same convolutional layer need to have the same dimensions and stride?

In Convolutional Neural Networks, do all filters of the same convolutional layer need to have the same dimensions and stride? If they don't, then it would seem the channel produced by each filter ...
David's user avatar
  • 303
1 vote
0 answers
87 views

Why does the number of channels in the PointNet increase as we go deeper?

For example, in PointNet, you see the 1D convolutions with the following channels 64 -> 128 -> 1024. Why not e.g. ...
user3180's user avatar
  • 598
2 votes
1 answer
667 views

Does the number of parameters in a convolutional neuronal network increase if the input dimension increases?

If I have a convolutional neuronal network, does the input dimension change the number of parameters? And if yes, why? If the sizes and lengths of the filters are still the same, how can the number of ...
Khan's user avatar
  • 175
0 votes
1 answer
548 views

How does the math behind heat map filters work?

I am working on an app that generates heat/ thermal map given a picture. i have been able to get what i expected using python opencv builtin function ...
Hissaan Ali's user avatar
8 votes
2 answers
718 views

What is the point of using 1D and 2D convolutions with a kernel size of 1 and 1x1 respectively?

I understand the gist of what convolutional neural networks do and what they are used for, but I still wrestle a bit with how they function on a conceptual level. For example, I get that filters with ...
Arcturai's user avatar
0 votes
1 answer
2k views

What happens to the channels after the convolution layer?

I wonder what happens to the 'channels' dimension (usually 3 for RGB images) after the first convolution layer in CNNs? In books and other sources, it is always said that the depth of the output ...
GKozinski's user avatar
  • 1,240
6 votes
2 answers
1k views

Can neurons in MLP and filters in CNN be compared?

I know they are not the same in working, but an input layer sends the input to $n$ neurons with a set of weights, based on these weights and the activation layer, it produces an output that can be fed ...
Tibo Geysen's user avatar
6 votes
2 answers
10k views

How to calculate the number of parameters of a convolutional layer?

I was recently asked at an interview to calculate the number of parameters for a convolutional layer. I am deeply ashamed to admit I didn't know how to do that, even though I've been working and using ...
Ælex's user avatar
  • 195
1 vote
1 answer
1k views

YOLOv3 Model Structure: Why is filters = (classes + coords + 1) * num?

Here's a tutorial about doing custom training of YOLO (Darknet): https://medium.com/@manivannan_data/how-to-train-yolov3-to-detect-custom-objects-ccbcafeb13d2 The tutorial guides how to set values in ...
Dan D.'s user avatar
  • 1,283
1 vote
1 answer
1k views

How is the depth of the filters of convolutional layers determined? [duplicate]

I am a bit confused about the depth of the convolutional filters in a CNN. At layer 1, there are usually about 40 3x3x3 filters. Each of these filters outputs a 2d array, so the total output of the ...
FourierFlux's user avatar
1 vote
1 answer
484 views

How can I make the kernels non-learnable and set them manually?

I'm a newbie in Convolutional Neural Networks. I have found out that kernels in convolutional layers are usually learned while training. Suppose I have a kernel that is very good to extract the ...
VansFannel's user avatar
2 votes
1 answer
5k views

How to compute the number of weights of a CNN?

How can we theoretically compute the number of weights considering a convolutional neural network that is used to classify images into two classes: INPUT: 100x100 gray-scale images. LAYER 1: ...
estamos's user avatar
  • 157
2 votes
1 answer
62 views

What are some references that describe known filters (or kernels) and how we can create new ones?

I'm pursuing a master's degree in Artificial Intelligence. My final work is about Convolutional Neural Networks. I was looking for information about filters (or kernels) of the convolutional layers. I ...
VansFannel's user avatar
5 votes
1 answer
2k views

How many weights does the max-pooling layer have?

How many weights does the max-pooling layer have? For example, if there are 10 inputs, a pooling filter of size 2, stride 2, how many weights, including bias, does a max-pooling layer have?
Tibby's user avatar
  • 53
5 votes
2 answers
1k views

Are filters fixed or learned?

No matter what I google or what paper I read, I can't find an answer to my question. In a deep convolutional neural network, let's say AlexNet (Krizhevsky, 2012), filters' weights are learned by means ...
nvergontbij's user avatar
2 votes
1 answer
304 views

If I wanted to calculate multiple feature maps in a convolutional layer, should the filters be trained individually?

Assume I have an input of size $32 \times 32 \times 3$ and pass it to a convolution layer. Now, if my kernel size were to be $5 \times 5 \times 3$ and the depth of my convolution layer were to be 1, ...
Dishant Sheth's user avatar
4 votes
1 answer
1k views

How is the number of parameters reduced in the group convolution?

I think I don't understand group convolutions well. Say you have 2 groups. This means that the number of parameters would be reduced in half. So, assuming you have an image and 100 channels, with a ...
Alex Marshall's user avatar
4 votes
1 answer
598 views

Why is the number of output channels 16 in the hidden layer of this CNN?

In this tutorial from Jeremy Howard: What is torch.nn really? he has an example towards the end where he creates a CNN for MNIST. In nn.Conv2d, he makes the ...
conv3d's user avatar
  • 183
66 votes
12 answers
59k views

In a CNN, does each new filter have different weights for each input channel, or are the same weights of each filter used across input channels?

My understanding is that the convolutional layer of a convolutional neural network has four dimensions: ...
Ryan Chase's user avatar
6 votes
1 answer
4k views

How are the kernels initialized in a convolutional neural network?

I am currently learning about CNNs. I am confused about how filters (aka kernels) are initialized. Suppose that we have a $3 \times 3$ kernel. How are the values of this filter initialized before ...
Inkplay_'s user avatar
  • 421