Skip to main content

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

Release files for torchmirror 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torchmirror 0.6.0
File Size Uploaded
torchmirror-0.6.0.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for torchmirror 0.6.0
File Interpreter ABI Platform
torchmirror-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 kB

Release files / torchmirror-0.6.0.tar.gz

Download URL torchmirror-0.6.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
92f5539040a64bd404c083aae259ceea39d0fb4500737b8545e8266c1cad6de3
BLAKE2b-256 checksum
How to use checksums
3e6f034bc9094d781e3c83b2c71d9c9d4e61d43bbbc3ec81c0d09a012e5218f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3

Release files / torchmirror-0.6.0-py3-none-any.whl

Download URL torchmirror-0.6.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
856bfb0641de13b0c8e37f8ddfb3fd44a422779717a21def0ef9ddd8921bf8b5
BLAKE2b-256 checksum
How to use checksums
164a915c30d5a9cf4528442506885f04f8289c1974940476ea19c47792e8f1fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page