<s> import DeepFried2 as df <EOL> from train import train <EOL> from test import validate <EOL> from model import net , lenet , lenet_same , lenet_cudnn <EOL> def main ( params ) : <EOL> train_set , valid_set , test_set = df . datasets . mnist . data ( ) <EOL> train_set_x , train_set_y = train_set <EOL> test_set_x , test_set_y = test_set <EOL> model = lenet ( ) <EOL> criterion = df . ClassNLLCriterion ( ) <EOL> optimiser = df . SGD ( lr = params [ '<STR_LIT>' ] ) <EOL> print ( "<STR_LIT>" ) <EOL> for epoch in range ( <NUM_LIT:100> ) : <EOL> model . training ( ) <EOL> train ( train_set_x , train_set_y , model , optimiser , criterion , epoch , params [ '<STR_LIT>' ] , '<STR_LIT:train>' ) <EOL> train ( train_set_x , train_set_y , model , optimiser , criterion , epoch , params [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> model . evaluate ( ) <EOL> validate ( test_set_x , test_set_y , model , epoch , params [ '<STR_LIT>' ] ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> if __package__ is None : <EOL> __package__ = "<STR_LIT>" <EOL> params = { } <EOL> params [ '<STR_LIT>' ] = <NUM_LIT:0.1> <EOL> params [ '<STR_LIT>' ] = <NUM_LIT:64> <EOL> main ( params ) </s>
