Skip to content

Commit

Permalink
reduce code
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Jul 28, 2021
1 parent 7225c19 commit dfacf7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
cuda = device.type != 'cpu'
init_seeds(1 + RANK)
with torch_distributed_zero_first(RANK):
if not data_dict:
data_dict = check_dataset(data) # check
data_dict = data_dict or check_dataset(data) # check if None
train_path, val_path = data_dict['train'], data_dict['val']
nc = 1 if single_cls else int(data_dict['nc']) # number of classes
names = ['item'] if single_cls and len(data_dict['names']) != 1 else data_dict['names'] # class names
Expand Down

0 comments on commit dfacf7b

Please sign in to comment.