hey, try to use this:
import torch.nn as nn
import torch

class Model(nn.Module):
    def __init__(self):
        super(Model, self).__init__()
        self.func = nn.Linear(10, 5)
        
    def forward(self, x):
        print(x[1])
        return self.func(x[0])

model = nn.Sequential(*[Model()])

x = y = torch.randn(size=(20, 10))

model((x, y))