Example of usage
import io
from PIL import Image
import numpy as np
import torch
from remtorch import RemoteDataset
class ImageDataset(RemoteDataset):
def prepare_item(self, item):
buf = io.BytesIO(item)
buf.seek(0)
img = Image.open(buf)
return np.array(img)
ds = ImageDataset(
'servername',
'username',
'password',
'/path/to/files',
batchsize
)
dl = torch.utils.data.DataLoader(ds, batchsize)
for img in dl:
# do smth
Release files for remtorch 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| remtorch-0.0.2.tar.gz | 2.8 kB | Details |
Release files / remtorch-0.0.2.tar.gz
| Download URL | remtorch-0.0.2.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a79b7b04725dbac1e429dd74daf06ebd53b008df4495ecddd8b42c6c2c3cff9d
|
|
BLAKE2b-256 checksum How to use checksums |
27079952ba5c033b8ba92e59fc1c8eba13674db31200ca8177656b3112add6a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|