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

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

上级 6a849313
......@@ -18,6 +18,7 @@ from __future__ import print_function
import os
import sys
import copy
import time
import random
import datetime
......@@ -333,7 +334,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)
......
......@@ -17,7 +17,6 @@ TrainReader:
beta: 1.5
- !ColorDistort {}
- !RandomExpand
ratio: 2.0
fill_value: [123.675, 116.28, 103.53]
- !RandomCrop {}
- !RandomFlipImage
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册