Usually you would flatten the activation via
x = x.view(x.size(0), -1)

to create a 2-dimensional tensor out of the 4-dimensional conv output.
If you are using torch.squeeze(x), this will remove a variable size of dimensions.
Assuming that you are using a batch_size>1, at least the channel dimension will be removed.
This would yield an activation of [batch_size, h, w], which is then passed to the linear layer.
nn.Linear takes an input as [batch_size, *, in_features], where * denotes additional dimensions. The linear layer will be applied on each of these additional dimensions and I’m not sure, if that’s what you really want in this case.
Could you replace the squeeze with the view operation and check the results again?