try:
            '''
            Main training and validation loop.
            '''
            # Reset the counters.