这些参数意味着什么?即(55000,784) 如何计算train_features,train_labels,权重和偏差的内存大小(以字节为单位)。忽略内存的开销,只需计算存储数据所需的内存。
train_features形状:(55000,784)类型:float32
train_labels形状:(55000,10)类型:float32
权重形状:(784,10)类型:float32
偏向形状:(10,)类型:float32
答案 0 :(得分:0)
由于float是32位。 32位= 4字节
train_features: 55000 * 784 * 4 = 172 480 000 bytes
train_labels Shape: 55000 * 10 * 4 = 2 200 000 bytes
weights Shape: 784 * 10 * 4 = 31 360 bytes
bias Shape: 10 * 4 = 40 bytes