How does ResNets work?

Hello everyone!
I have a problem to understand about ResNets. Here is some questions that i want to ask…

First, Does ResNets use Skip Connection or main path?

Second, If it use skip connection (Which i think it should), does it works this way if i have a[0], and i have the value for a[0] and i skipped 2 layers through before the activation relu function of a[2], and basically a[2] = g[2](z[2] + a[0])?

Third, Then, if it skipped 2 layers does it included the computation in those 2 layers?

Fourth, If it is, then how are we going to get the value z[2]?

You could do some correction on my post and i had be happy to respond!

Hey @BryanEL,
A ResNet uses both the Skip Connections as well as the Main Path. Had the ResNet being using only one of these, there is no reason to keep the other as a part of the ResNet diagram. Feel free to watch the lecture video entitled ResNets once again, to wrap your head around this idea.

Coming to your second question, ResNets work in this way indeed. In fact, I guess you have answered your first question yourself. Had the ResNets being only using the skip connections, where do you think z[2] is coming from? And the answer is that z[2] is coming from the main path.

I guess the 3rd and 4th questions doesn’t make much sense now. I hope this helps, still if you face any issues, feel free to let us know. Always happy to help.

Regards,
Elemento

Ah, that makes sense. Thank you for your help!

1 Like