yolov5 修改epoch后还是按照之前的运行

如图 设置的接着上次训练200轮的模型后训练到300轮 但是运行后却是按照200轮训练的 这样会训练到400轮

 ckpt['epoch'] = 200
        start_epoch = ckpt['epoch']
        if opt.resume:
            assert start_epoch > 0, '%s training to %g epochs is finished, nothing to resume.' % (weights, epochs)
        if epochs < start_epoch:
            logger.info('%s has been trained for %g epochs. Fine-tuning for %g additional epochs.' %
                        (weights, ckpt['epoch'], epochs))
            epochs += ckpt['epoch']  # finetune additional epochs

        del ckpt, state_dict

初始已修改

yolov5 修改epoch后还是按照之前的运行_第1张图片

你可能感兴趣的:(pytorch,python)