Solved by MariosOreo in post #6 
              
              
                Hello, 
I think you should rewrite function Swish as a sub-class of nn.Module, and call Swish() instead of Swish in the Sequential.