Could you explain a bit more about h_j and what it is supposed to be?
Some how I don’t understand, how a_input is built.
Also, if I run this code snippet, output has a size of [batch_size, 10]. Is this the right behavior, given out_features=2?
in_features = 5
out_features = 2
model = MyModule(in_features, out_features)

x = Variable(torch.randn(10, in_features).cuda())
output = model(x)