This error:
Expected 4-dimensional input for 4-dimensional weight [6, 3, 5, 5], but got 3-dimensional input of size [64, 126, 126] instead

is raised because your samples seem to be missing a channel dimension.
In your next approach it seems you were trying to clone the data and create 3 input channels, which then was running into a shape mismatch in a linear layer:
RuntimeError: mat1 and mat2 shapes cannot be multiplied (64x12544 and 400x120)

Based on this error a linear layer is using in_features=400 while your input activation to this layer has 12544 features. Set the in_features argument to 12544 and rerun your code.