Вычисление точности и отзыва в примере с Tenorflow - PullRequest
0 голосов
/ 07 октября 2018

Я хотел бы вычислить точность и вызвать в примере команды речи tenorflow: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/speech_commands/train.py, особенно в этой части кода.

      for i in xrange(0, set_size, FLAGS.batch_size):
test_fingerprints, test_ground_truth = audio_processor.get_data(
    FLAGS.batch_size, i, model_settings, 0.0, 0.0, 0, 'testing', sess)
test_accuracy, conf_matrix = sess.run(
    [evaluation_step, confusion_matrix],
    feed_dict={
        fingerprint_input: test_fingerprints,
        ground_truth_input: test_ground_truth,
        dropout_prob: 1.0
    })
batch_size = min(FLAGS.batch_size, set_size - i)
total_accuracy += (test_accuracy * batch_size) / set_size
if total_conf_matrix is None:
  total_conf_matrix = conf_matrix
else:
  total_conf_matrix += conf_matrix
tf.logging.info('Confusion Matrix:\n %s' % (total_conf_matrix))
tf.logging.info('Final test accuracy = %.1f%% (N=%d)' % (total_accuracy * 100,
                                                       set_size))

У меня есть матрица путаницы, но как я могуЯ получаю другие оценочные матрицы, такие как точность, и вспоминаю из них?

Спасибо

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...