未验证 提交 0f2e9a5b 编写于 作者: Z zhiboniu 提交者: GitHub

change dark_w32_384x288 batchsize to 32; modify np.pad to support lower numpy version (#3788)

上级 40436c83
...@@ -111,7 +111,7 @@ TrainReader: ...@@ -111,7 +111,7 @@ TrainReader:
std: *global_std std: *global_std
is_scale: true is_scale: true
- Permute: {} - Permute: {}
batch_size: 64 batch_size: 32
shuffle: true shuffle: true
drop_last: false drop_last: false
......
...@@ -106,6 +106,7 @@ class HrHRNetPostProcess(object): ...@@ -106,6 +106,7 @@ class HrHRNetPostProcess(object):
# pad the cost matrix, otherwise new pose are ignored # pad the cost matrix, otherwise new pose are ignored
if num_valid > num_clusters: if num_valid > num_clusters:
cost = np.pad(cost, ((0, 0), (0, num_valid - num_clusters)), cost = np.pad(cost, ((0, 0), (0, num_valid - num_clusters)),
'constant',
constant_values=((0, 0), (0, 1e-10))) constant_values=((0, 0), (0, 1e-10)))
rows, cols = linear_sum_assignment(cost) rows, cols = linear_sum_assignment(cost)
for y, x in zip(rows, cols): for y, x in zip(rows, cols):
......
...@@ -35,7 +35,7 @@ class HigherHRNet(BaseArch): ...@@ -35,7 +35,7 @@ class HigherHRNet(BaseArch):
def __init__(self, def __init__(self,
backbone='HRNet', backbone='HRNet',
hrhrnet_head='HigherHRNetHead', hrhrnet_head='HrHRNetHead',
post_process='HrHRNetPostProcess', post_process='HrHRNetPostProcess',
eval_flip=True, eval_flip=True,
flip_perm=None, flip_perm=None,
...@@ -224,6 +224,7 @@ class HrHRNetPostProcess(object): ...@@ -224,6 +224,7 @@ class HrHRNetPostProcess(object):
# pad the cost matrix, otherwise new pose are ignored # pad the cost matrix, otherwise new pose are ignored
if num_valid > num_clusters: if num_valid > num_clusters:
cost = np.pad(cost, ((0, 0), (0, num_valid - num_clusters)), cost = np.pad(cost, ((0, 0), (0, num_valid - num_clusters)),
'constant',
constant_values=((0, 0), (0, 1e-10))) constant_values=((0, 0), (0, 1e-10)))
rows, cols = linear_sum_assignment(cost) rows, cols = linear_sum_assignment(cost)
for y, x in zip(rows, cols): for y, x in zip(rows, cols):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册