Subject | Hash | Author | Date (UTC) |
---|---|---|---|
fix | 1ed58b687a60985cd23721b0189a22429f3d1fe4 | Xiangru Lian | 2019-01-09 21:52:01 |
add reset to auc estimator | 333badd5489e538b0ee9b5441331322ba72d3981 | Xiangru Lian | 2019-01-08 21:17:22 |
add riemann auc estimator | 8ce1b37008f10d6ca825728b1d0106b03bb0529d | Xiangru Lian | 2019-01-08 21:11:27 |
fix | d4f0a50ffb6afea07df425d759fdf8460839d0ce | Xiangru Lian | 2019-01-07 22:27:56 |
add numpy support | 2e10283edfc427ea4da6a76c8c3a6f85a44bace4 | Xiangru Lian | 2019-01-07 22:24:12 |
update | fcfc8a26e275395688fb3fa50538f890c1f612e4 | Xiangru Lian | 2019-01-07 21:55:04 |
use markdown for readme | f46e30761b4f361d5494484d9bdb20dc04a20d83 | Xiangru Lian | 2019-01-07 21:53:46 |
add readme | a9a0b91ea0e0485039ea76b6b69c5f983815e8a3 | Xiangru Lian | 2019-01-07 21:52:31 |
fix | 16a965862eaefa554a540fd2eeee26f73907d5dd | Xiangru Lian | 2019-01-07 21:37:12 |
fix setup.py | 24e85045cc859ffa7d6f514c80257fde94c0794a | Xiangru Lian | 2019-01-07 21:35:15 |
compatible with setup.py | 657782ac87ea9251f2e3726b483089eca5384caf | Xiangru Lian | 2019-01-07 21:33:48 |
initial commit | 27cb0b3b4f5f20240af6d14ead4f373a1aaa5343 | Xiangru Lian | 2019-01-07 21:26:20 |
Update .gitignore | 52642556fea807b773617938eecd2d9d17f34bc6 | ikzk | 2019-01-07 20:16:37 |
File | Lines added | Lines deleted |
---|---|---|
persia_pytorch_toolkit/tensor_utils.py | 2 | 2 |
File persia_pytorch_toolkit/tensor_utils.py changed (mode: 100644) (index 946ff2a..4899dc5) | |||
... | ... | def to_device(container, device): | |
27 | 27 | ||
28 | 28 | def _numpy_dtype_to_torch_dtype(dtype: np.dtype): | def _numpy_dtype_to_torch_dtype(dtype: np.dtype): |
29 | 29 | t = dtype.type | t = dtype.type |
30 | if t is np.float64: | ||
30 | if t is np.float64 or t is np.float32: | ||
31 | 31 | return torch.float | return torch.float |
32 | elif t is np.int64: | ||
32 | elif t is np.int64 or t is np.int32: | ||
33 | 33 | return torch.long | return torch.long |
34 | 34 | else: | else: |
35 | 35 | raise Exception("Unknown numpy dtype: " + str(t)) | raise Exception("Unknown numpy dtype: " + str(t)) |