I am still confused that which part of this code could be wrong.
Both the input and model size are as expected:
output = model(in_val)
The length of in_val is 20, while the model is
DistributedDataParallel(
  (module): Sequential(
    (0): Linear(in_features=20, out_features=10, bias=True)
    (1): Linear(in_features=10, out_features=20, bias=True)
  )
)


Any suggestion or comment would be appreciated.