"examples/vscode:/vscode.git/clone" did not exist on "09779cbb4046b0afa7cc3da043c928dc4866d59a"
Unverified Commit 47d0927f authored by Double_V's avatar Double_V Committed by GitHub
Browse files

Merge pull request #2859 from WenmuZhou/fix_dataset

fix lable parse error when \r in the end of line
parents 7fd8d6a2 9497580d
......@@ -74,7 +74,7 @@ class SimpleDataSet(Dataset):
data_line = self.data_lines[file_idx]
try:
data_line = data_line.decode('utf-8')
substr = data_line.strip("\n").split(self.delimiter)
substr = data_line.strip("\n").strip("\r").split(self.delimiter)
file_name = substr[0]
label = substr[1]
img_path = os.path.join(self.data_dir, file_name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment