List of commits:
Subject Hash Author Date (UTC)
support shared memory tensor 87538b5eb8b47635f33a0b5279063f85fa512ac1 Xiangru Lian 2019-03-21 06:43:15
support pin memory 2c59b6183da0938759bbf87662ed8ce1e4865277 Xiangru Lian 2019-03-18 03:24:19
add flatten, unflatten functionality c29d658f64268a71c2315e596e0b66cdea2ca360 Xiangru Lian 2019-01-22 03:36:10
fix 2c0e85220abbc1bf1f962cc80fb7924e45b14fec Xiangru Lian 2019-01-22 03:12:04
add model flatten function ccce38ff5010861ccf1a6437a87f1b7d82faf349 Xiangru Lian 2019-01-21 01:38:29
fix 43cdf7e3a85af6b517c7a36e6b22cb7e9c4e073a Xiangru Lian 2019-01-13 09:17:26
fix df37e441a6280fe15cc1852fa4701364f1326e33 Xiangru Lian 2019-01-13 09:13:31
bump version 859ac9c2c748528cf879a20e7036472141b2895a Xiangru Lian 2019-01-13 08:48:44
add running auc meter 1494873cc463891b978b263e0d8bd691f3b30526 Xiangru Lian 2019-01-13 08:48:23
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
Commit 87538b5eb8b47635f33a0b5279063f85fa512ac1 - support shared memory tensor
Author: Xiangru Lian
Author date (UTC): 2019-03-21 06:43
Committer name: Xiangru Lian
Committer date (UTC): 2019-03-21 06:43
Parent(s): 2c59b6183da0938759bbf87662ed8ce1e4865277
Signing key:
Tree: 95012c9051f693e0a80705a08f99016ac380cb90
File Lines added Lines deleted
persia_pytorch_toolkit/tensor_utils.py 9 5
setup.py 1 1
File persia_pytorch_toolkit/tensor_utils.py changed (mode: 100644) (index 8fcc6a2..8fbf64a)
... ... def _numpy_dtype_to_torch_dtype(dtype: np.dtype):
35 35 raise Exception("Unknown numpy dtype: " + str(t)) raise Exception("Unknown numpy dtype: " + str(t))
36 36
37 37
38 def to_device_from_numpy(container, device, pin_memory=False):
38 def to_device_from_numpy(container, device, pin_memory=False, shared_memory=False):
39 39 """The device could be cuda:0 for example.""" """The device could be cuda:0 for example."""
40 40 device = torch.device(device) device = torch.device(device)
41 return _iterate_over_container(container,
42 lambda x: torch.as_tensor(x, dtype=_numpy_dtype_to_torch_dtype(x.dtype), device=device).pin_memory() if pin_memory else torch.as_tensor(x, dtype=_numpy_dtype_to_torch_dtype(x.dtype), device=device),
43 np.ndarray
44 )
41 def as_tensor(x):
42 tensor = torch.as_tensor(x, dtype=_numpy_dtype_to_torch_dtype(x.dtype), device=device)
43 if pin_memory:
44 tensor = tensor.pin_memory()
45 if shared_memory:
46 tensor.share_memory_()
47 return tensor
48 return _iterate_over_container(container, as_tensor, np.ndarray)
File setup.py changed (mode: 100644) (index 6114cc0..1308486)
1 1 from setuptools import setup from setuptools import setup
2 2
3 3 setup(name='persia_pytorch_toolkit', setup(name='persia_pytorch_toolkit',
4 version='0.0.6',
4 version='0.0.7',
5 5 description="Xiangru Lian's toolkit with PyTorch.", description="Xiangru Lian's toolkit with PyTorch.",
6 6 url='https://github.com/ikzk/persia_pytorch_toolkit', url='https://github.com/ikzk/persia_pytorch_toolkit',
7 7 author="Xiangru Lian", author="Xiangru Lian",
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/ikzk/persia-pytorch-toolkit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/ikzk/persia-pytorch-toolkit

Clone this repository using git:
git clone git://git.rocketgit.com/user/ikzk/persia-pytorch-toolkit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main