When implementing neural nets, particularly convnets, I always recommend writing down the dimensions you expect to get (e.g., via comments in code or goode olde pen & paper) and see if they match with what you actually get. This is really important for making sure the network is doing what you intend it to do.
That being said, your expected output size should be
(32 - 3) /2 + 1 = 15.5
I suppose Caffe is rounding up whereas PyTorch is rounding down.
PS: I would try to implement your nets such that you avoid fractions, because it’s ambiguous and is handled differently from framework to framework, which can cause a lot of ambiguity.