parameters: (data_iterator, net)
return_statement: return acc.get()[1]
docstring: Function to evaluate accuracy of any data iterator passed to it as an argument
docstring_summary: Function to evaluate accuracy of any data iterator passed to it as an argument
docstring_tokens: Function to evaluate accuracy of any data iterator passed to it as an argument
function: def evaluate_accuracy(data_iterator, net):
      """Function to evaluate accuracy of any data iterator passed to it as an argument"""
      acc = mx.metric.Accuracy()
      for data, label in data_iterator:
          output = net(data)
          predictions = nd.argmax(output, axis=1)
          predictions = predictions.reshape((-1, 1))
          acc.update(preds=predictions, labels=label)
      return acc.get()[1]
function_tokens: def evaluate_accuracy ( data_iterator , net ) : acc = mx . metric . Accuracy ( ) for data , label in data_iterator : output = net ( data ) predictions = nd . argmax ( output , axis = 1 ) predictions = predictions . reshape ( ( - 1 , 1 ) ) acc . update ( preds = predictions , labels = label ) return acc . get ( ) [ 1 ]