Your size calculation might be a bit wrong, since x will have the shape [10, 256, 1, 1] after features.
Change your first linear layer in classifier to nn.Linear(256, 4096) and the reshaping operation to x = x.view(x.size(0), -1) and your code should work.