I meant torch.from_numpy.  The error is quite clear:
RuntimeError:  can’t convert a given np.ndarray to a tensor - it has an invalid type.  The only supported types are: double, float, int64, int32, and uint8.