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

If you're not sure about the file name format, learn more about wheel file names.

torchhk-0.86.9-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file torchhk-0.86.9-py3-none-any.whl.

File metadata

  • Download URL: torchhk-0.86.9-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for torchhk-0.86.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b13e6e435318a38608795f5b0d52788dfc88e6b0bcbdd6a4eab1abc2e3470a13
MD5 2226870389f8964d1c4fd9d50f140f46
BLAKE2b-256 d26aaa78b6c8b1d1794f8e7c93ca8a70ce82c35e683b98c5ad8e8966ffcf050f

See more details on using hashes here.

Supported by

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