Tensorflow 2 Cifar10离线数据集手动下载、离线安装、本地加载、快速读取

时间:2022-12-17 22:12:30

Tensorflow 2 Cifar10离线数据集手动下载、离线安装、本地加载、快速读取

商务合作,科技咨询,版权转让:向日葵,135—4855__4328,xiexiaokui#qq.com

 

查看数据集列表:

目录:C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Lib\site-packages\tensorflow_core\python\keras\datasets

Tensorflow 2 Cifar10离线数据集手动下载、离线安装、本地加载、快速读取

 

目录:C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Lib\site-packages\tensorflow_core\python\keras\datasets\__pycache__

Tensorflow 2 Cifar10离线数据集手动下载、离线安装、本地加载、快速读取

 

Cifar10手动下载,Link:

https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz

 

离线安装步骤

复制到:

C:\Users\DFKJ3\.keras\datasets

改名:

打开压缩包,发现里面又有个文件夹,名称为,cifar-10-batches-py ,复制下来,将下载的压缩包改名为cifar-10-batches-py.tar.gz

解压

为了保险起见,解压两次,一次解压到当前文件夹,另一次解压到压缩包所在目录。

Tensorflow 2 Cifar10离线数据集手动下载、离线安装、本地加载、快速读取

 

同样操作以下的文件夹(可能非必要)

复制到(非必要):

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Lib\site-packages\tensorflow\python\keras\datasets\cifar-10-batches-py\

 

复制到(非必要):

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Lib\site-packages\tensorflow_core\python\keras\api\keras\datasets

 

Tensorflow 2 Cifar10离线数据集手动下载、离线安装、本地加载、快速读取

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Lib\site-packages\tensorflow_core\python\keras\api\keras\datasets\cifar10

Tensorflow 2 Cifar10离线数据集手动下载、离线安装、本地加载、快速读取

(train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data()

 

# Normalize pixel values to be between 0 and 1

train_images, test_images = train_images / 255.0, test_images / 255.0

 

 

 

商务合作,科技咨询,版权转让:向日葵,135—4855__4328,xiexiaokui#qq.com