If your import is of size (16,16,3)
then your Linear layer should be nn.Linear(3, output_features)
and will return output of size (16,16,output_features).
And if you feed it input of size (16,32,3)
then it will produce output of size (16,32,output_features)