How to send two inputs into one fully connected layer

is it possible to send two seperate single 1*1 vectors into a fully connected layer that would take in 2 values and output a single one.


self.fc = nn.Linear(2, 1)

def forward():
x = [2]
y = [3]

is this possible or is there another to achieve the same thing?

1 Like

Would this work?

lin = nn.Linear(2, 1)

x = Variable(torch.FloatTensor(1).fill_(2))
y = Variable(torch.FloatTensor(1).fill_(3))

lin(, y)))