parameters: (self, scores, labels)
return_statement: return (float(passed) * 100.0 / float(batch_size), passed, results)
docstring: Compute the training accuracy of the results of a single mini-batch
docstring_summary: Compute the training accuracy of the results of a single mini-batch
docstring_tokens: Compute the training accuracy of the results of a single mini - batch
function: def batch_accuracy(self, scores, labels):
          """ Compute the training accuracy of the results of a single mini-batch """
          batch_size = scores.shape[0]
          passed = 0
          results = []
          for i in range(batch_size):
              expected = labels[i]
              actual = scores[i].argmax()
              results += [int(actual)]
              if expected == actual:
                  passed += 1
          return (float(passed) * 100.0 / float(batch_size), passed, results)
function_tokens: def batch_accuracy ( self , scores , labels ) : batch_size = scores . shape [ 0 ] passed = 0 results = [ ] for i in range ( batch_size ) : expected = labels [ i ] actual = scores [ i ] . argmax ( ) results += [ int ( actual ) ] if expected == actual : passed += 1 return ( float ( passed ) * 100.0 / float ( batch_size ) , passed , results )