MCPcopy
hub / github.com/MrNothing/AI-Blocks / loadAllFiles

Function loadAllFiles

Sources/scripts/CIFAR10_loader.py:36–49  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

34self.loadAllFiles(self.path+"/")
35
36def loadAllFiles(self, path):
37 Log("Loading files...")
38
39 if self.FILES_AMOUNT<=1:
40 self.loadFile(path+"train", False)
41 self.loadFile(path+"test", True)
42 else:
43 for i in range(self.FILES_AMOUNT):
44 file_name = path+"data_batch_"+str(i+1)
45 self.loadFile(file_name)
46 SetState(self.id, i/self.FILES_AMOUNT)
47
48 file_name = path+"test_batch"
49 self.loadFile(path+"test_batch", True)
50
51def loadFile(self, file, isTest=False):
52 fo = open(file, 'rb')

Callers

nothing calls this directly

Calls 2

LogFunction · 0.85
SetStateFunction · 0.85

Tested by

no test coverage detected