未验证 提交 fc61d99f 编写于 作者: K Kaipeng Deng 提交者: GitHub

warning when YOLOv3Loss.batch_size setting (#1475)

* warning when YOLOv3Loss.batch_size setting
上级 66d2e727
......@@ -23,6 +23,9 @@ try:
except Exception:
from collections import Sequence
import logging
logger = logging.getLogger(__name__)
__all__ = ['YOLOv3Loss']
......@@ -44,7 +47,7 @@ class YOLOv3Loss(object):
def __init__(
self,
train_batch_size=8,
batch_size=8, # stub for backward compatable
batch_size=-1, # stub for backward compatable
ignore_thresh=0.7,
label_smooth=True,
use_fine_grained_loss=False,
......@@ -63,6 +66,11 @@ class YOLOv3Loss(object):
self.scale_x_y = scale_x_y
self.match_score = match_score
if batch_size != -1:
logger.warn(
"config YOLOv3Loss.batch_size is deprecated, "
"training batch size should be set by TrainReader.batch_size")
def __call__(self, outputs, gt_box, gt_label, gt_score, targets, anchors,
anchor_masks, mask_anchors, num_classes, prefix_name):
if self._use_fine_grained_loss:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册