Skip to content

Commit

Permalink
修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fangwei123456 committed Sep 9, 2020
1 parent 53c3d8b commit bf38c29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spikingjelly/datasets/nav_gesture.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def create_frames_dataset(events_data_dir, frames_data_dir, frames_num=10, split

def __init__(self, root: str, use_frame=True, frames_num=10, split_by='number', normalization='max'):
events_root = os.path.join(root, 'events')
if os.path.exists(events_root) and os.listdir(events_root).__len__() == 10:
if os.path.exists(events_root) and os.listdir(events_root).__len__() == 9:
# 如果root目录下存在events_root目录,且events_root下有10个子文件夹,则认为数据集文件存在
print(f'events data root {events_root} already exists.')
else:
Expand All @@ -113,7 +113,7 @@ def __init__(self, root: str, use_frame=True, frames_num=10, split_by='number',
self.data_dir = None
if use_frame:
frames_root = os.path.join(root, f'frames_num_{frames_num}_split_by_{split_by}_normalization_{normalization}')
if os.path.exists(frames_root) and os.listdir(frames_root).__len__() == 10:
if os.path.exists(frames_root) and os.listdir(frames_root).__len__() == 9:
# 如果root目录下存在frames_root目录,且frames_root下有10个子文件夹,则认为数据集文件存在
print(f'frames data root {frames_root} already exists.')
else:
Expand Down

0 comments on commit bf38c29

Please sign in to comment.