输出结果
核心代码
network = DeepConvNet()
network.load_params("data_input/DeepConvNet/deep_convnet_params.pkl")
#T1、caluculate accuracy(float64)
print("DeepConvNet【7+1】 on mnist:caluculate accuracy (float64 type) ... ")
print(network.accuracy(x_test, t_test)) #caluculate accuracy(float64)
#T2、caluculate accuracy(float16)
x_test = x_test.astype(np.float16)
for param in network.params.values():
param[...] = param.astype(np.float16)
print("DeepConvNet【7+1】 on mnist:caluculate accuracy (float16 type) ... ")
print(network.accuracy(x_test, t_test))