fix up torch device

Change-Id: Icc67be04a891e3337853a725c738cf8eab5ac553