how can I connect models in pytorch?
I made 2 classes:
class Preprocess():
    def __init
     .....
    def forward 
     ....

class Model ():
    def __init
     .....
    def forward 

I would like to do Preprocess before putting them into Model. Could you kindly tell me how can I achieve that ?

One could also use torch.nn.Sequential which has the following upsides:

easier on the eyes
one has to just pass the inputs instead of remembering to call Preprocess before it

Code being:
model = torch.nn.Sequential(Preprocess(), Model())

