2
$\begingroup$

One thing that confuses me about CNN is that I cannot tell when something is designed based on calculation versus when something is (arbitrary) design choice (no need for calculation).

My question is very simple:

What do you actually need to calculate in order to design a convolutional neural network, or are all the parameters basically just design choices?


For example, in Pytorch, a conv block looks something like

nn.Conv2d(...)

where by the parameter inside are things like the number of channels in the input image, number of channels produced by conv layer, size of the kernel, stride, and padding.

The number of channels is already known to us.

Kernel, stride, padding and the number of channels produced by the conv layer (width of the conv layer) are all design choices. It is not going to make or break or design if we choose a 4x4 filter vs 5x5.

So it seems to me that you don't really need to calculate anything in order to design a CNN, and all the parameters are basically design choices.

Is this correct or am I missing something?


As another example, suppose I want to design a CNN for MNIST classification. All I know is that my images are 28 by 28, with 1 channel. Is there any thing with our input parameters (28x28x1) that guides or influence the design of our network?

$\endgroup$
1
$\begingroup$

You’re kind of right, but not totally. There are several ways to design the network. I’ll name three.

1) Domain knowledge. If you know what you’re looking for, you can look for it!

2) Using what has brought success to others on related problems.

3) Cross validation. Let the data guide your decisions.

I say you’re kind of right because, for some problems (e.g. MNIST), you can throw just about any CNN at the data and get pretty good performance. You’ll have to work to get world-class performance, but you can do well without having to do much.

And you’re also kind of wrong because that last little bit to go from good to world-class requires a mixture of all three of the points I mentioned.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.