List of commits:
Subject Hash Author Date (UTC)
support pin memory and shared memory in to_device 487b2c69b05750bfdf64753665f16c5f7a61b4d8 Xiangru Lian 2019-03-21 10:41:56
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
Commit 487b2c69b05750bfdf64753665f16c5f7a61b4d8 - support pin memory and shared memory in to_device
Author: Xiangru Lian
Author date (UTC): 2019-03-21 10:41
Committer name: Xiangru Lian
Committer date (UTC): 2019-03-21 10:41
Parent(s): 55adc3ce10e8352077df279e835babe1134c468c
Signing key:
Tree: 823ed3fd3acff06f17527fa2283ffae1790b6ca7
File Lines added Lines deleted
persia_pytorch_toolkit/tensor_utils.py 9 2
setup.py 1 1
File persia_pytorch_toolkit/tensor_utils.py changed (mode: 100644) (index 8fbf64a..8cb5c78)
... ... def _iterate_over_container(inputs, func, instance_type=torch.Tensor):
19 19 iterate = None iterate = None
20 20
21 21
22 def to_device(container, device):
22 def to_device(container, device, pin_memory=False, shared_memory=False):
23 23 """The device could be cuda:0 for example.""" """The device could be cuda:0 for example."""
24 24 device = torch.device(device) device = torch.device(device)
25 return _iterate_over_container(container, lambda x: x.to(device))
25 def do_to_device(x):
26 x = x.to(device)
27 if pin_memory:
28 x = x.pin_memory()
29 if shared_memory:
30 x.share_memory_()
31 return x
32 return _iterate_over_container(container, to_device)
26 33
27 34
28 35 def _numpy_dtype_to_torch_dtype(dtype: np.dtype): def _numpy_dtype_to_torch_dtype(dtype: np.dtype):
File setup.py changed (mode: 100644) (index 1308486..cc18f97)
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.7',
4 version='0.0.8',
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