mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-04 18:40:28 +00:00
[tutorial] added data script and updated readme (#1916)
This commit is contained in:
13
examples/tutorial/download_cifar10.py
Normal file
13
examples/tutorial/download_cifar10.py
Normal 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()
|
Reference in New Issue
Block a user