Yes it does. You can only use instances of classes to give them to the sequential model. For almost every function you can simply wrap it inside a torch module (and for some methods as Relu such a wrapper exists already).