[tutorial] added data script and updated readme (#1916)

This commit is contained in:
Frank Lee
2022-11-12 16:38:41 +08:00
committed by GitHub
parent 155e202318
commit d53415bc10
3 changed files with 42 additions and 6 deletions

View File

@@ -0,0 +1,13 @@
import os
from torchvision.datasets import CIFAR10
def main():
dir_path = os.path.dirname(os.path.realpath(__file__))
data_root = os.path.join(dir_path, 'data')
dataset = CIFAR10(root=data_root, download=True)
if __name__ == '__main__':
main()