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

Rude carnie modified #47

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

abhijithrb
Copy link

Made changes to handle memory issue.
In the utils.py, there were ops in the make_multi_crop_batch and make_multi_image_batch that were added to the graph with each iteration of a loop such as:

crop = tf.image.resize_images(image, (RESIZE_FINAL, RESIZE_FINAL))
image = standardize_image(crop)
images.append(image)
image_batch = tf.stack(images)

Hence with each loop iteration, there were nodes added to the graph resulting in an incremental increase in memory usage and thus execution time.
In utils.py, I've modified the ImageCoder class such that the Ops are added just once to the graph.

@dpressel
Copy link
Owner

dpressel commented Nov 2, 2017

Thanks for submitting this. I need a bit more time to review the change. Thanks for your patience

@abhijithrb
Copy link
Author

No problem at all.
If you find this to be ok, I can make a PR of my master branch as well which runs both age and gender models in the same code, if that's a change you'd like to consider

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.

None yet

2 participants