(self, engine=None)
return criterions
Create the two criterions using the bootstrap criterion factory
Create the two criterions using the bootstrap criterion factory
Create the two criterions using the bootstrap criterion factory
def _init_criterions(self, engine=None):
        """ Create the two criterions using the bootstrap criterion factory
        """
        # by default all modes have criterions
        if engine:
            modes = list(engine.dataset.keys())  # [train, val] for mnist
        else:
            modes = ['train', 'eval']

        criterions = {}
        for mode in modes:
            tmp_cri = cri_factory(engine, mode)
            if tmp_cri is not None:
                criterions[mode] = tmp_cri
        return criterions
def _init_criterions ( self , engine = None ) : # by default all modes have criterions if engine : modes = list ( engine . dataset . keys ( ) ) # [train, val] for mnist else : modes = [ 'train' , 'eval' ] criterions = { } for mode in modes : tmp_cri = cri_factory ( engine , mode ) if tmp_cri is not None : criterions [ mode ] = tmp_cri return criterions