I am trying to implement a model from an Arxiv paper. The author used Keras to implement it. I thought that a relevant way to implement it using PyTorch is by using nn.Sequential . Here is the architecture of the model.

Capture282×634 27.5 KB

I understand the concept of nn.Sequential but I don’t know how to include torch.add() in a nn.Sequential block.