Skip to main content

PyTorch数据集国内镜像

一、使用方法

只需要在使用数据集之前导入torch_dataset_mirror模块即可,如下:

import torch
import torch_dataset_mirror
import torchvision.datasets.mnist as mnist

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

二、使用其他镜像

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

export PYTORCH_DATASET_MIRROR=http://192.168.0.100:8080

Release files for torch-dataset-mirror 0.2.1

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

Source distribution (sdist)

Source distribution for torch-dataset-mirror 0.2.1
File Size Uploaded
torch_dataset_mirror-0.2.1.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for torch-dataset-mirror 0.2.1
File Interpreter ABI Platform
torch_dataset_mirror-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / torch_dataset_mirror-0.2.1.tar.gz

Download URL torch_dataset_mirror-0.2.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e133f23c5cc2acea54f6d06a43f91d05e5dca0849930b72622fc1cbeb4b59c1e
BLAKE2b-256 checksum
How to use checksums
027f14869485ebf88e7e4c8dfb55e1024c01ddd8f6f499e958d20fffd18cc04c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.7

Release files / torch_dataset_mirror-0.2.1-py3-none-any.whl

Download URL torch_dataset_mirror-0.2.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a3c536d159d219cb64c79da926837672327856f62088049e4fd79a661698612
BLAKE2b-256 checksum
How to use checksums
2bab65cd62e9d59932bdbc8cb35b27bb316e93d694727fd3b5345aea9ee03128
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

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