To concatenate two tensors in a specific dimension, all other dimension shapes should match.
In your case dim0 differs with the shapes 431 and 1, repectively.
I’m not sure how these tensors are used, but usually dim0 refers to the batch dimension and I would expect this dimension to have the same size.