未验证 提交 8f010ecf 编写于 作者: D Dec20B 提交者: GitHub

修改数据增强导致的DSR报错 (#10662)

* 修改数据增强导致的DSR报错

* 错误修改回滚
上级 549376ea
......@@ -32,4 +32,4 @@
description: Format files with ClangFormat
entry: bash .clang_format.hook -i
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$
\ No newline at end of file
......@@ -61,9 +61,15 @@ class SimpleDataSet(Dataset):
def set_epoch_as_seed(self, seed, dataset_config):
if self.mode == 'train':
try:
dataset_config['transforms'][5]['MakeBorderMap'][
border_map_id = [index
for index, dictionary in enumerate(dataset_config['transforms'])
if 'MakeBorderMap' in dictionary][0]
shrink_map_id = [index
for index, dictionary in enumerate(dataset_config['transforms'])
if 'MakeShrinkMap' in dictionary][0]
dataset_config['transforms'][border_map_id]['MakeBorderMap'][
'epoch'] = seed if seed is not None else 0
dataset_config['transforms'][6]['MakeShrinkMap'][
dataset_config['transforms'][shrink_map_id]['MakeShrinkMap'][
'epoch'] = seed if seed is not None else 0
except Exception as E:
print(E)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册