Python 2 –> 3: object of type ‘zip’ has no len()

A bit late now to answer, but in case anyone else stumbles on it: for that same neural net example tutorial, it turned out I had to wrap the 3 zip calls in the mnist_loader with a list(zip(…)) construct:

training_data = list(zip(training_inputs, training_results))
(...)
validation_data = list(zip(validation_inputs, va_d[1]))
(...)
test_data = list(zip(test_inputs, te_d[1]))

And then it worked.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)