(self, engine=None)
return metrics
Create the two metrics using the bootstrap metric factory
Create the two metrics using the bootstrap metric factory
Create the two metrics using the bootstrap metric factory
def _init_metrics(self, engine=None):
        """ Create the two metrics using the bootstrap metric factory
        """
        # by default all modes have metrics
        if engine:
            modes = list(engine.dataset.keys())
        else:
            modes = ['train', 'eval']

        metrics = {}
        for mode in modes:
            tmp_met = met_factory(engine, mode)
            if tmp_met is not None:
                metrics[mode] = tmp_met
        return metrics
def _init_metrics ( self , engine = None ) : # by default all modes have metrics if engine : modes = list ( engine . dataset . keys ( ) ) else : modes = [ 'train' , 'eval' ] metrics = { } for mode in modes : tmp_met = met_factory ( engine , mode ) if tmp_met is not None : metrics [ mode ] = tmp_met return metrics