Skip to main content

pytorch模型、数据集国内镜像

Project description

PyTorch模型、数据集国内镜像

一、使用方法

只需要在使用模型或数据集之前导入torchmirror.datasettorchmirror.model模块即可,如下:

import torch
import torchvision.datasets.mnist as mnist
from torchmirror import dataset, model

train_dataset = mnist.MNIST("./data", train=True, download=True)
test_dataset = mnist.MNIST("./data", train=False, download=True)

二、使用其他镜像

要使用其他镜像,只需要修改PYTORCH_MODEL_MIRRORPYTORCH_DATASET_MIRROR环境变量即可,如下:

export PYTORCH_MODEL_MIRROR=http://192.168.0.100:8080
export PYTORCH_DATASET_MIRROR=http://192.168.0.100:8080

Project details


Download files

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

Source Distribution

torchmirror-0.6.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

torchmirror-0.6.0-py3-none-any.whl (9.0 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