首先,给出下载数据方法(这里编译环境是matlab2018a):
1.下载 CIFAR-10 图片数据
cifar10Data = tempdir;
url = 'https://www.cs.toronto.edu/~kriz/cifar-10-matlab.tar.gz';
helperCIFAR10Data.download(url,cifar10Data);
这里给出了helperCIFAR10Data文件内容:
% This is helper class to download and import the CIFAR-10 dataset. The
% dataset is downloaded from:
%
% https://www.cs.toronto.edu/~kriz/cifar-10-matlab.tar.gz
%
% References
% ----------
% Krizhevsky, Alex, and Geoffrey Hinton. "Learning multiple layers of
% features from tiny images." (2009).
classdef helperCIFAR10Data
methods(Static)
%------------------------------------------------------------------
function download(url, destination)
if nargin == 1
url = 'https://ww