# Run some setup code for this notebook.
import random
import numpy as np
from keras.datasets import cifar10
import matplotlib.pyplot as plt
from __future__ import print_function
# This is a bit of magic to make matplotlib figures appear inline in the notebook
# rather than in a new window.
%matplotlib inline
plt.rcParams['figure.figsize'] = (10.0, 8.0) # set default size of plots
plt.rcParams['image.interpolation'] = 'nearest'
plt.rcParams['image.cmap'] = 'gray'
# Some more magic so that the notebook will reload external python modules;
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2
#读取数据集
(X_train, y_train), (X_test, y_test) = cifar10.load_data()
# As a sanity check, we print out the size of the training and test data.
print('Training data shape: ', X_train.shape)
print('Training labels shape: ', y_train.shape)
print('Test d
CS231n作业1——数据集导入和可视化代码
最新推荐文章于 2024-06-12 10:58:19 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)