Convert int8 numpy array to CharTensor (#14700)
authorSsnL <tongzhou.wang.1994@gmail.com>
Mon, 10 Dec 2018 15:36:06 +0000 (07:36 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 10 Dec 2018 15:39:06 +0000 (07:39 -0800)
commit9b2bd284b3da4c2e703ac1d2fe8d1c40dfa01e93
tree3a07e061a47e1bc4898efdc58321b9b205f6c247
parente1b5dbf699a0c1e948c692767288a34482c37f8a
Convert int8 numpy array to CharTensor (#14700)

Summary:
When rewriting `default_collate`, I noticed that `from_numpy` and `as_tensor` and `tensor` all do not work on `np.int8` arrays.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14700

Reviewed By: weiyangfb

Differential Revision: D13305297

Pulled By: soumith

fbshipit-source-id: 2937110f65ed714ee830d50098db292238e9b2a9
test/test_torch.py
torch/csrc/utils/tensor_numpy.cpp