My code snippet creates a tensor in the shape of [batch_size, 6220802], which now doesn’t match the expected input features to the next linear layer, so you should either change the in_features to the new value (which would be quite large) or change the logic of how the tensors should be concatenated.