Train_image=trainset_image [' image ']/255.0
Trainset_label=the sio. Loadmat (' D://GML MNIST data/trainset_label mat ')
Train_label=trainset_label [' label ']
Testset_image=the sio. Loadmat (' D://GML MNIST data/testset_image mat ')
Test_image=testset_image [' image ']/255.0
Testset_label=the sio. Loadmat (' D://GML MNIST data/testset_label mat ')
Test_label=testset_label [' label ']
Line -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Traceback (the most recent call last) :
The File "D://GML Pycharm project/number/mnist_train py", line 11, the in & lt; module>
Train_image=trainset_image [' image ']/255.0
KeyError: 'image'
CodePudding user response:
Print (trainset_image)See if there are any image of this column,
CodePudding user response: