Inference with HalfTensor for speed up

Answered here.