0
$\begingroup$

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 convolutional neural networks.

From this angle, the job of a convolutional neural network is to estimate the kernel of a set of filter banks in successive layers that will transform a multichannel image into another multichannel image, where different channels correspond to different features (such as one channel for the average, another channel for vertical edges, and so on).

The usage of words kernel and filter bank in this excerpt confused me as i generally treat both to be the same.

What is the subtle difference between a filter and a kernel in the context of CNN?

$\endgroup$
3
  • 1
    $\begingroup$ In the context of CNNs, filter and kernel are the same thing, although I am not saying that you couldn't make a conceptual distinction between the two. I've never seen "filter" being used to refer to something that is different than the "kernel". It's just the tensor of weights/parameters. Filter banks, which I am not familiar with, are something specific, which is used in other contexts other than CNNs. The author is probably trying to make an analogy with filter banks. Without knowing the details of how "filter banks" are mathematically defined and implemented, I cannot say more than this. $\endgroup$
    – nbro
    Commented Feb 19, 2022 at 11:24
  • 1
    $\begingroup$ As Neil says below, you could say that the kernel is used to implement the filtering operation. For example, in image processing, you could say that you use a Gaussian kernel to filter/blur an image. So, in this sense, there's a conceptual difference. However, in the context of CNNs, this difference is never made, because we usually don't think of CNNs as neural networks that filter the image, but that extract features from the image. $\endgroup$
    – nbro
    Commented Feb 19, 2022 at 11:30
  • $\begingroup$ Keep in mind that you can also have a neural network that "filters" the image. For example, you can implement some autoencoder that deblurs/filters the image. However, you could well also say that this autoencoder uses the convolution to deblur the image and never mention the word "filter" or use the word filter to refer to the matrix of weights (i.e. kernel). $\endgroup$
    – nbro
    Commented Feb 19, 2022 at 11:37

1 Answer 1

1
$\begingroup$

The kernel is the matrix of numbers that implements the filter. The filter is the effect or function that is applied to the input signal.

It is possible to conceive of filters in the general sense that work other than applying convolutions, but of course those mainly exist outside of CNNs, and a complex enough CNN can approximate any filter that is implemented differently.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .