File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ def main(args):
178178 'screenId' : [],
179179 }
180180 testFrames = trainFrames = 0
181+ framesPerChunk = {}
181182 # subfolders: PlaceId -> UserId -> ScreenId -> start_time.npz
182183 folder = args .folder
183184 foldersList = lambda x : [nm for nm in os .listdir (x ) if os .path .isdir (os .path .join (x , nm ))]
@@ -202,12 +203,19 @@ def main(args):
202203 )
203204 testFrames += testFramesN
204205 trainFrames += trainFramesN
206+ # store the number of frames per chunk
207+ sid = '%s/%s/%s' % (placeId , userId , screenId )
208+ framesPerChunk [sid ] = testFramesN + trainFramesN
205209 continue
206210 print ('Total: %d training frames, %d testing frames' % (trainFrames , testFrames ))
207211
208212 # save the stats
209213 with open (os .path .join (folder , 'stats.json' ), 'w' ) as f :
210214 json .dump (stats , f , indent = 2 )
215+
216+ print ('-' * 80 )
217+ for k , v in framesPerChunk .items ():
218+ print ('%s: %d frames' % (k , v ))
211219 return
212220
213221if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments