(_)
| 69 | |
| 70 | |
| 71 | def main(_): |
| 72 | interpreter = tf.lite.Interpreter(model_path=flags.model_file) |
| 73 | interpreter.allocate_tensors() |
| 74 | num_correct, total = 0, 0 |
| 75 | for input_data in test_image_generator(): |
| 76 | output = run_eval(interpreter, input_data[0]) |
| 77 | total += 1 |
| 78 | if output == input_data[1]: |
| 79 | num_correct += 1 |
| 80 | if total % 500 == 0: |
| 81 | print('Accuracy after %i images: %f' % |
| 82 | (total, float(num_correct) / float(total))) |
| 83 | |
| 84 | |
| 85 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected