Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update network.py #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update network.py #92

wants to merge 1 commit into from

Conversation

YCAyca
Copy link

@YCAyca YCAyca commented May 9, 2019

I am working on your online book and projects using Python 3.5. Since I used a different and newer python version, I came across several problems and solved them by making some changes in network.py and mnist_loader files. Now the code is compatible with Python 3.5
The biggest problem is zip variables haven't len() attribute in 3.5. So I converted training_data, test_data to the list variables. I had to make a deep copy of original training and test data because when they are converted to list variables, they can't be reused.

I am working on your online book and projects using Python 3.5. Since I used a different and newer python version, I came across several problems and solved them by making some changes in network.py and mnist_loader files.  Now the code is compatible with Python 3.5
The biggest problem is zip variables haven't len() attribute in 3.5. So I converted training_data, test_data to the list variables. I had to make a deep copy of original training and test data because when they are converted to list variables, they can't be reused.
@will-maclean
Copy link

I'm pretty sure the creator isn't planning on porting to python 3 so he's unlikely to merge this. Have you managed to port the code though?

@YCAyca
Copy link
Author

YCAyca commented Dec 10, 2019

Yes I ported the code and I made the commit with the explanations above :)

@tushar-dalal
Copy link

The data could stay in zip form if the data was temporarily converted to list type and then applied the len() function
len(list(test_data[1]))
this way, I believe, there wont be memory problems either(even tho memory should not be an issue).
Or would this not work either?

@Deancook1
Copy link

How can I get the complete version code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants