#helper libraries
import numpy as np
import pandas as pd
#loading the data
import os
train_dataset = pd.read_csv("/content/sample_data/mnist_train_small.csv")
test_dataset = pd.read_csv("/content/sample_data/mnist_test.csv")
# each image is mapped to a label so (a number from 1 to 10) so for ease of use the labels have been given class names
class_names = ['T-shirt/top', 'Pair of Trouser', 'Pull over', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle Boot']
#exploring the data
train_dataset.shape()
test_dataset.shape()
TypeError Traceback(上次调用(在((1#探索hte数据2〃"quot;我们需要知道我们的数据的维度,以便我们知道如何最好地连接或给予它任何类似的过程"quot;---->3列车数据集形状((4测试_数据集形状((
TypeError:"tuple"对象不可调用
Shape
不是一个可调用的函数。只需使用以下内容而不是shape()
,即可获得其尺寸
train_dataset.shape
test_dataset.shape