-
Notifications
You must be signed in to change notification settings - Fork 13
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
create label file for ResNet model #513
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great! My only thought is: Should we move the get_resnet*.py to the tutorials folder or elsewhere? or is this the best place for it?
Also good to fix the linter errors on the get_resnet.py file! |
yeah, I totally agree. This script is really only to show how I obtained the txt file and has no other purpose. Maybe I can simply paste the script in this issue for the logging, and then delete the file as it has no other use |
Yeah, that is a good idea! Good to have it archived somewhere (such as here) but its not needed otherwise. |
Code used to generate label file"""write all class labels for the ResNet50 model to a txt file"""
import numpy as np
from tensorflow.keras.applications.resnet50 import decode_predictions
class_names = [decode_predictions(np.eye(1,1000, i))[0][0][1] for i in range(0, 1000)]
with open('labels_resnet50.txt', 'w', encoding="utf-8") as file:
file.write('\n'.join(class_names)) |
Closes #512 |
Created label file for ResNet model, included script and resulting txt file