-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfind_data.py
More file actions
55 lines (49 loc) · 1.58 KB
/
Copy pathfind_data.py
File metadata and controls
55 lines (49 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import os
print("Searching for MNIST files...\n")
# Check all possible locations
locations_to_check = [
'data',
r'data\MNIST',
r'data\mnist',
]
mnist_files = [
'train-images-idx3-ubyte.gz',
'train-images-idx3-ubyte',
]
found = False
for location in locations_to_check:
print(f"Checking: {location}")
if os.path.exists(location):
print(f" ✓ Folder exists")
contents = os.listdir(location)
print(f" Contents: {contents}")
# Check for MNIST files
for mnist_file in mnist_files:
full_path = os.path.join(location, mnist_file)
if os.path.exists(full_path):
print(f"\n✓✓✓ FOUND MNIST DATA! ✓✓✓")
print(f"Use this in train.py: data_path = r'{location}'")
found = True
break
if found:
break
else:
print(f" ✗ Folder does not exist")
print()
if not found:
print("\n❌ MNIST files not found in expected locations")
print("\nLet's check your data folder structure:")
if os.path.exists('data'):
print("\nContents of 'data' folder:")
for item in os.listdir('data'):
item_path = os.path.join('data', item)
if os.path.isdir(item_path):
print(f" 📁 {item}/")
# Check inside subfolders
try:
for subitem in os.listdir(item_path):
print(f" - {subitem}")
except:
pass
else:
print(f" 📄 {item}")