Solved by nikostr in post #2 
              
              
                My bad. This is a known issue. In case someone else has a similar problem, the workaround is to cast the numpy array as a supported dtype, eg uint8, prior to turning it into a ByteTensor.