Joint Device-Edge Inference over Wireless Links with Pruning