未验证 提交 b87a1ea8 编写于 作者: W wangxinxin08 提交者: GitHub

fix ema copy problem and correct config of ppyolo in static graph (#3371)

上级 27d4a24d
...@@ -17,6 +17,8 @@ from __future__ import division ...@@ -17,6 +17,8 @@ from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os
import sys
import copy
import time import time
import random import random
import datetime import datetime
...@@ -326,7 +328,7 @@ class Trainer(object): ...@@ -326,7 +328,7 @@ class Trainer(object):
# apply ema weight on model # apply ema weight on model
if self.use_ema: if self.use_ema:
weight = self.model.state_dict() weight = copy.deepcopy(self.model.state_dict())
self.model.set_dict(self.ema.apply()) self.model.set_dict(self.ema.apply())
self._compose_callback.on_epoch_end(self.status) self._compose_callback.on_epoch_end(self.status)
......
...@@ -17,7 +17,6 @@ TrainReader: ...@@ -17,7 +17,6 @@ TrainReader:
beta: 1.5 beta: 1.5
- !ColorDistort {} - !ColorDistort {}
- !RandomExpand - !RandomExpand
ratio: 2.0
fill_value: [123.675, 116.28, 103.53] fill_value: [123.675, 116.28, 103.53]
- !RandomCrop {} - !RandomCrop {}
- !RandomFlipImage - !RandomFlipImage
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册