Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
had to add line to retrain.py file to get model accuracy. must be better way. #3
fully acknowledging it is not a best practice, i added a line to tensorflow's retrain.py script because i could not get stdout=subprocess.PIPE or any close permutation to work. and although tf.logging says it prints to stdout, there is an github issue that disputes that, along with stackexchange conversation and my experience.
therefore, the add_accuracy_to_modeldir() function in robo_tfretrain.py relies on pulling the model accuracy from the "retrained_labels.txt" file generated at the end of tensorflow's retraining. i glommed onto that file creation to add accuracy to a line at the end of that file, then use add_accuracy_to_modeldir() to grab it, and delete it from the file.
the added line is literally the last line in retrain.py's main() function. around line 1144 i added:
BUT I WOULD LOVE to just grab it from tf.logging.info and/or stdout or anything that doesnt require a change to a file i didnt create...