How are the weights of filters in a CNN can learn meaningful features in multiclasses classification if they keep changing as different images are passed through the network during training.Say we are doing multi class classification using CNN and my doubt is say there are 5 classes, and and no of kernels/filters are say 10, so let's say my first image is a pen, and we pass it through the model and kernel weights will be changed right, and then say we pass an image of a book and then the weights will again be changed right? So if the weights of filters keep changing how will it learn anything?
1 Answer
$\begingroup$
$\endgroup$
The learning happens as the weights are adjusted to minimize a loss function.
In case of multiclass classification the output is C
numbers where C
is the number of classes. The output should match a discrete probability with 1 in the correct class and 0 in all others. The weights are adjusted to achieve that given all the data and not for a specific case.