deepy/trainers/base.py
def report(self, score_map, type="valid", epoch=-1, new_best=False):
        """
        Report the scores and record them in the log.
        """
        type_str = type
        if len(type_str) < 5:
            type_str += " " * (5 - len(type_str))
        info = " ".join("%s=%.2f" % el for el in score_map.items())
        current_epoch = epoch if epoch > 0 else self.current_epoch()
        epoch_str = "epoch={}".format(current_epoch + 1)
        if epoch < 0:
            epoch_str = "dryrun"
            sys.stdout.write("\r")
            sys.stdout.flush()
        marker = " *" if new_best else ""
        message = "{} ({}) {}{}".format(type_str, epoch_str, info, marker)
        self.network.train_logger.record(message)
        logging.info(message)
def report(self, score_map, type="valid", epoch=-1, new_best=False):
        """
        Report the scores and record them in the log.
        """
        type_str = type
        if len(type_str) < 5:
            type_str += " " * (5 - len(type_str))
        info = " ".join("%s=%.2f" % el for el in score_map.items())
        current_epoch = epoch if epoch > 0 else self.current_epoch()
        epoch_str = "epoch={}".format(current_epoch + 1)
        if epoch < 0:
            epoch_str = "dryrun"
            sys.stdout.write("\r")
            sys.stdout.flush()
        marker = " *" if new_best else ""
        message = "{} ({}) {}{}".format(type_str, epoch_str, info, marker)
        self.network.train_logger.record(message)
        logging.info(message)
def report ( self , score_map , type = "valid" , epoch = - 1 , new_best = False ) : type_str = type if len ( type_str ) < 5 : type_str += " " * ( 5 - len ( type_str ) ) info = " " . join ( "%s=%.2f" % el for el in score_map . items ( ) ) current_epoch = epoch if epoch > 0 else self . current_epoch ( ) epoch_str = "epoch={}" . format ( current_epoch + 1 ) if epoch < 0 : epoch_str = "dryrun" sys . stdout . write ( "\r" ) sys . stdout . flush ( ) marker = " *" if new_best else "" message = "{} ({}) {}{}" . format ( type_str , epoch_str , info , marker ) self . network . train_logger . record ( message ) logging . info ( message )
Report the scores and record them in the log.
Report the scores and record them in the log .