def validate(self, validation_data):
    'Validate the Neural Network on provided validation data. It uses the\n        number of correctly predicted examples as validation accuracy metric.\n\n        Parameters\n        ----------\n        validation_data : list of tuple\n\n        Returns\n        -------\n        int\n            Number of correctly predicted images.\n\n        '
    validation_results = [(self.predict(x) == y) for (x, y) in validation_data]
    return sum((result for result in validation_results))
Validate the Neural Network on provided validation data. It uses the
number of correctly predicted examples as validation accuracy metric.

Parameters
----------
validation_data : list of tuple

Returns
-------
int
    Number of correctly predicted images.
def validate(self, validation_data):
    'Validate the Neural Network on provided validation data. It uses the\n        number of correctly predicted examples as validation accuracy metric.\n\n        Parameters\n        ----------\n        validation_data : list of tuple\n\n        Returns\n        -------\n        int\n            Number of correctly predicted images.\n\n        '
    validation_results = [(self.predict(x) == y) for (x, y) in validation_data]
    return sum((result for result in validation_results))