As @Omegastick explained, you would need to flatten all data so that you could concatenate the inputs in the feature dimension.
The structure of the image tensor will get lost, if you are using linear layers. On the other hand while nn.Conv1d might capture some of the image structure, the “temporal” dimension between the different data samples might cause other issues.