Use torch model in pytorch

I encountered an error when I loaded the torch model and ran model.forward

/torch/legacy/nn/JoinTable.py: 28 size[dim] += currentOutput.size(dim)
IndexError: list index out of range

The model structure looks like the following:
nn.Sequential {
[input -> (0) -> (1) -> (2) -> output]
(0): torch.legacy.nn.ParallelTable.ParallelTable {
input
|-> (0): nn.Sequential { | [input -> (0) -> (1) -> output] | (0): nn.LookupTable | (1): nn.Sum | } |-> (1): nn.Sequential {
[input -> (0) -> (1) -> output]
(0): nn.LookupTable
(1): nn.Sum
}
… -> output
}
(1): nn.JoinTable
(2): nn.Linear(128 -> 128) without bias
}