Skip to content

Commit

Permalink
Update LIVEFolder.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zwx8981 authored Jan 24, 2019
1 parent dc40472 commit ff2a5fb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions LIVEFolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@


def getFileName(path, suffix):
''' 获取指定目录下的所有指定后缀的文件名 '''
filename = []
f_list = os.listdir(path)
# print f_list
for i in f_list:
# os.path.splitext():分离文件名与扩展名
if os.path.splitext(i)[1] == suffix:
filename.append(i)
return filename
Expand Down Expand Up @@ -135,4 +133,4 @@ def default_loader(path):
train_index = index[0:round(0.8*29)]
test_index = index[round(0.8*29):29]
trainset = LIVEFolder(root = liveroot, loader = default_loader, index = train_index)
testset = LIVEFolder(root = liveroot, loader = default_loader, index = test_index)
testset = LIVEFolder(root = liveroot, loader = default_loader, index = test_index)

0 comments on commit ff2a5fb

Please sign in to comment.