Skip to main content

Framework-agnostic library for loading data

Project description

dpshdl

A framework-agnostic library for loading data.

Installation

pip install dpshdl

Usage

Datasets should override a single method, next, which returns a single sample.

import dpshdl as dl
import numpy as np

class MyDataset(dl.Dataset[np.ndarray]):
    def next(self) -> np.ndarray:
        return np.random.rand(10)

loader = dl.Dataloader(MyDataset(), batch_size=2)

# Loops forever.
for sample in loader:
    print(sample)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dpshdl-0.0.1.tar.gz (19.6 kB view hashes)

Uploaded Source

Built Distribution

dpshdl-0.0.1-py3-none-any.whl (20.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page