diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py index cef560d9d3cadf923fd0683ba5996a541be8fd65..e0ac8ea16bbc3cb0728e05e741eb53c0e980bdae 100644 --- a/ppdet/engine/trainer.py +++ b/ppdet/engine/trainer.py @@ -17,6 +17,8 @@ from __future__ import division from __future__ import print_function import os +import sys +import copy import time import random import datetime @@ -326,7 +328,7 @@ class Trainer(object): # apply ema weight on model if self.use_ema: - weight = self.model.state_dict() + weight = copy.deepcopy(self.model.state_dict()) self.model.set_dict(self.ema.apply()) self._compose_callback.on_epoch_end(self.status) diff --git a/static/configs/ppyolo/ppyolov2_reader.yml b/static/configs/ppyolo/ppyolov2_reader.yml index 02a385c1898f2f698b0adc852f42acf2712bab2b..d291ab1f7b02b4cca3dba589e552376e4d4d12f1 100644 --- a/static/configs/ppyolo/ppyolov2_reader.yml +++ b/static/configs/ppyolo/ppyolov2_reader.yml @@ -17,7 +17,6 @@ TrainReader: beta: 1.5 - !ColorDistort {} - !RandomExpand - ratio: 2.0 fill_value: [123.675, 116.28, 103.53] - !RandomCrop {} - !RandomFlipImage