def error_rate(predictions, labels):
 return (100.0 - ((100.0 * np.sum((np.argmax(predictions, 1) == labels))) / predictions.shape[0]))

def error_rate ( predictions , labels ) : return ( 100.0 - ( ( 100.0 * np . sum ( ( np . argmax ( predictions , 1 ) == labels ) ) ) / predictions . shape [ 0 ] ) )
return the error rate based on dense predictions and sparse labels .