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

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchhk-0.86.11-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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 b9a8a86f433e455c4ebf8f122dff3f8d927d8547ea10d8b08071e196796742d5
MD5 10b3e7188b4cca68fdb740723791e67e
BLAKE2b-256 123257a4df7f5b55be46e51ec72ba3cbb37146898cca0d8914d99aaf024545e6

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