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.14-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchhk-0.86.14-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/4.12.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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 0e9d4b36b638dbee72ccb98c65b1b3c5a5378e0c008f70da2fd021404037467a
MD5 3cddcf7227e27f7d73c1e21a6f7421c9
BLAKE2b-256 42381cf7979f3a1ba807749699fa7930a2633524663bbc6a033c556bdf744126

See more details on using hashes here.

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