Commit 55d73951 authored by Pithawat Vachiramon's avatar Pithawat Vachiramon Committed by Soumith Chintala
Browse files

Fix invalid argument error when using lsun method in windows (#508)

parent 2e255335
......@@ -22,7 +22,7 @@ class LSUNClass(data.Dataset):
readahead=False, meminit=False)
with self.env.begin(write=False) as txn:
self.length = txn.stat()['entries']
cache_file = '_cache_' + root.replace('/', '_')
cache_file = '_cache_' + ''.join(c for c in root if c in string.ascii_letters)
if os.path.isfile(cache_file):
self.keys = pickle.load(open(cache_file, "rb"))
else:
......
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