Skip to main content

Custom utils for PyTorch

Project description

pytorch-custom-utils

License Pypi

This is a lightweight repository to help PyTorch users.

Usage

:clipboard: Dependencies

  • torch 1.4.0
  • torchvision 0.5.0
  • python 3.6
  • matplotlib 2.2.2
  • numpy 1.14.3
  • seaborn 0.9.0
  • sklearn
  • plotly

:hammer: Installation

  • pip install torchhk or
  • git clone https://github.com/Harry24k/pytorch-custom-utils
from torchhk import *

:rocket: Demos

  • RecordManager (code, markdown): RecordManager will help you to keep tracking training records.

  • Datasets (code, markdown): Dataset will help you to use torch datasets including split and label-filtering.

Supported datasets

# CIFAR10
datasets = Datasets("CIFAR10", root='./data')

# CIFAR100
datasets = Datasets("CIFAR100", root='./data')

# STL10
datasets = Datasets("STL10", root='./data')

# MNIST
datasets = Datasets("MNIST", root='./data')

# FashionMNIST
datasets = Datasets("FashionMNIST", root='./data')

# SVHN
datasets = Datasets("SVHN", root='./data')

# MNISTM
datasets = Datasets("MNISTM", root='./data')

# ImageNet
datasets = Datasets("ImageNet", root='./data')

# USPS
datasets = Datasets("USPS", root='./data')

# TinyImageNet
datasets = Datasets("TinyImageNet", root='./data')

# CIFAR with Unsupervised
datasets = Datasets("CIFAR10U", root='./data')
datasets = Datasets("CIFAR100U", root='./data')

# Corrupted CIFAR (Only test data will be corrupted)
# CORRUPTIONS = [
#    'gaussian_noise', 'shot_noise', 'impulse_noise', 'defocus_blur',
#    'glass_blur', 'motion_blur', 'zoom_blur', 'snow', 'frost', 'fog',
#    'brightness', 'contrast', 'elastic_transform', 'pixelate',
#    'jpeg_compression'
#]
datasets = Datasets("CIFAR10", root='./data',corruption='gaussian_noise')

  • Vis (code, markdown): Vis will help you to visualize torch tensors.

  • Transform (code): Transform will help you to change specific layers.

Contribution

Contribution is always welcome! Use pull requests :blush:

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

torchhk-0.86.9-py3-none-any.whl (21.1 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