Skip to content

Commit b716edd

Browse files
LutaoChunepeplwu
authored andcommitted
"if args.opts is not None:" change to "if args.opts:" (#75)
* fix bug
1 parent 1cd90f9 commit b716edd

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pdseg/eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def main():
165165
args = parse_args()
166166
if args.cfg_file is not None:
167167
cfg.update_from_file(args.cfg_file)
168-
if args.opts is not None:
168+
if args.opts:
169169
cfg.update_from_list(args.opts)
170170
cfg.check_and_infer()
171171
print(pprint.pformat(cfg))

pdseg/export_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def main():
116116
args = parse_args()
117117
if args.cfg_file is not None:
118118
cfg.update_from_file(args.cfg_file)
119-
if args.opts is not None:
119+
if args.opts:
120120
cfg.update_from_list(args.opts)
121121
cfg.check_and_infer()
122122
print(pprint.pformat(cfg))

pdseg/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def var_shape_matched(var, shape):
447447
def main(args):
448448
if args.cfg_file is not None:
449449
cfg.update_from_file(args.cfg_file)
450-
if args.opts is not None:
450+
if args.opts:
451451
cfg.update_from_list(args.opts)
452452
cfg.check_and_infer()
453453
print(pprint.pformat(cfg))

pdseg/vis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def visualize(cfg,
260260
args = parse_args()
261261
if args.cfg_file is not None:
262262
cfg.update_from_file(args.cfg_file)
263-
if args.opts is not None:
263+
if args.opts:
264264
cfg.update_from_list(args.opts)
265265
cfg.check_and_infer()
266266
print(pprint.pformat(cfg))

0 commit comments

Comments
 (0)