Conv based resnet

How can I implement resnet as in the picture? How to add X to the next layer?

It seems that this can be done using pooling.

Have a look at the resnet implementation in torchvision.
In particular the definition of BasicBlock and Bottleneck might be helpful.

1 Like