Parameter sharing

How is sharing of weights beneficial in RNN?

Hey @ambika11, since the weights of each RNN unit in a single layer are the same, there are less parameters to train. And lesser the number of parameters to train, lesser are the computations done by the model. So the training time reduces significantly and the complexity of the model also decreases.

I hope this helps !
Please mark the doubt as resolved in your doubts section ! :slight_smile:
Happy Learning ! :slightly_smiling_face:

Then why is it specifically used in RNN? why don’t we use weight sharing in CNN or ANN?

Hey @ambika11, it completely depends on the task we are trying to achieve. In case of CNN , we are not interested in a sequential nature of anything. In CNNs, each filter in each layer is responsible for detecting a different feature of the image. Like the filter in the first layer would detect the edges (maybe) and the filter in second layer detects a bigger part of the image say faces and so on. So there the weights in each filter have to be different to extract different features from the images.

I hope this clears your doubt !
Happy Learning ! :slight_smile: