Skip to content

Commit

Permalink
fix split_dataset_list error (#2079)
Browse files Browse the repository at this point in the history
  • Loading branch information
juncaipeng authored May 7, 2022
1 parent 01ed9c3 commit 4fec7b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/split_dataset_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def get_files(path, format, postfix):
def generate_list(args):
separator = args.separator
dataset_root = args.dataset_root
if sum(args.split) != 1.0:
if abs(sum(args.split) - 1.0) > 1e-8:
raise ValueError("划分比例之和必须为1")

file_list = os.path.join(dataset_root, 'labels.txt')
Expand Down

0 comments on commit 4fec7b3

Please sign in to comment.