Skip to content

Commit

Permalink
fix: fix the type of the dilation argument
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyingming committed Nov 25, 2021
1 parent e9f5235 commit a5418ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ def main(args):

if args.frozen_weights is not None:
assert args.masks, "Frozen training is meant for segmentation only"

if isinstance(args.dilation,str):
if args.dilation.lower() == 'false':
args.dilation = False
elif args.dilation.lower() == 'true':
args.dilation = True
else:
raise ValueError("The dilation should be True or False")
print(args)

device = torch.device(args.device)
Expand Down

0 comments on commit a5418ea

Please sign in to comment.