#NEWLINE# def get_previous_network_snapshots( ) : #NEWLINE# #INDENT# prev_network_snapshots = [ ] #NEWLINE# for ( job_id , _ ) in get_previous_networks ( ) : #NEWLINE# #INDENT# job = scheduler . get_job ( job_id ) #NEWLINE# e = ( [ ( 0 , 'None' ) ] + [ ( epoch , ( 'Epoch #%s' % epoch ) ) for ( _ , epoch ) in reversed ( job . train_task ( ) . snapshots ) ] ) #NEWLINE# if job . train_task ( ) . pretrained_model : #NEWLINE# #INDENT# e . insert ( 0 , ( ( - 1 ) , 'Previous pretrained model' ) ) #NEWLINE# #UNINDENT# prev_network_snapshots . append ( e ) #NEWLINE# #UNINDENT# return job_id