Skip to main content

Spike manipulation and augmentation

Project description

tonic Documentation Status

Tonic provides publicly available spike-based datasets and a pipeline of data augmentation methods based on PyTorch, which enables multithreaded dataloading and shuffling as well as batching.

Have a look at the list of supported datasets and transformations!

Install

pip install tonic

Quickstart

import tonic
import tonic.transforms as transforms

transform = transforms.Compose([transforms.TimeJitter(variance=10),
                                transforms.FlipLR(flip_probability=0.5),
                                transforms.ToTimesurface(surface_dimensions=(7,7), tau=5e3),])

testset = tonic.datasets.NMNIST(save_to='./data',
                                train=False,
                                transform=transform)

testloader = tonic.datasets.DataLoader(testset, shuffle=True)

for surfaces, target in iter(testloader):
    print("{} surfaces for target {}".format(len(surfaces), target))

Documentation

You can find the full documentation on Tonic here.

Project details


Release history Release notifications | RSS feed

This version

0.2.0

Download files

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

Source Distribution

tonic-0.2.0.tar.gz (211.2 kB view hashes)

Uploaded Source

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