Map the value in a tensor using dictionary

I believe this is useful Cv2 remap in pytorch? - #10 by Felix_Lessange