MichalDanielDobrzanski / DeepLearningPython

neuralnetworksanddeeplearning.com integrated scripts for Python 3.5.2 and Theano with CUDA support
MIT License
2.79k stars 1.27k forks source link

'zip' object is not subscriptable #21

Open hisham32 opened 5 years ago

hisham32 commented 5 years ago

I am getting the error 'zip object is not subscriptable' when I run the following command in python 3:

net.SGD(training_data[:1000], 10, 10, 0.5, evaluation_data=test_data, lmbda = 0.1, # this is a regularization parameter monitor_evaluation_cost=True, monitor_evaluation_accuracy=True, monitor_training_cost=True, monitor_training_accuracy=True)

I have tried changing the mnist_loader by wrapping the zip commands with list, but it's not working.

callezenwaka commented 4 years ago

Hi @hisham32 could you resolve this error?

Try:

import mnist_loader training_data, validation_data, test_data = mnist_loader.load_data_wrapper() training_data = list(training_data)