<s> import beacon8 as bb8 <EOL> def net ( ) : <EOL> model = bb8 . Sequential ( ) <EOL> model . add ( bb8 . Linear ( <NUM_LIT> * <NUM_LIT> , <NUM_LIT:100> ) ) <EOL> model . add ( bb8 . ReLU ( ) ) <EOL> model . add ( bb8 . Linear ( <NUM_LIT:100> , <NUM_LIT:100> ) ) <EOL> model . add ( bb8 . ReLU ( ) ) <EOL> model . add ( bb8 . Linear ( <NUM_LIT:100> , <NUM_LIT:100> ) ) <EOL> model . add ( bb8 . ReLU ( ) ) <EOL> model . add ( bb8 . Linear ( <NUM_LIT:100> , <NUM_LIT:10> ) ) <EOL> model . add ( bb8 . SoftMax ( ) ) <EOL> return model <EOL> def lenet ( ) : <EOL> model = bb8 . Sequential ( ) <EOL> model . add ( bb8 . Reshape ( - <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT> , <NUM_LIT> ) ) <EOL> model . add ( bb8 . SpatialConvolutionCUDNN ( <NUM_LIT:1> , <NUM_LIT:32> , <NUM_LIT:5> , <NUM_LIT:5> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:2> , with_bias = False ) ) <EOL> model . add ( bb8 . BatchNormalization ( <NUM_LIT:32> ) ) <EOL> model . add ( bb8 . ReLU ( ) ) <EOL> model . add ( bb8 . SpatialMaxPoolingCUDNN ( <NUM_LIT:2> , <NUM_LIT:2> ) ) <EOL> model . add ( bb8 . SpatialConvolutionCUDNN ( <NUM_LIT:32> , <NUM_LIT:64> , <NUM_LIT:5> , <NUM_LIT:5> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:2> , with_bias = False ) ) <EOL> model . add ( bb8 . BatchNormalization ( <NUM_LIT:64> ) ) <EOL> model . add ( bb8 . ReLU ( ) ) <EOL> model . add ( bb8 . SpatialMaxPoolingCUDNN ( <NUM_LIT:2> , <NUM_LIT:2> ) ) <EOL> model . add ( bb8 . Reshape ( - <NUM_LIT:1> , <NUM_LIT:7> * <NUM_LIT:7> * <NUM_LIT:64> ) ) <EOL> model . add ( bb8 . Linear ( <NUM_LIT:7> * <NUM_LIT:7> * <NUM_LIT:64> , <NUM_LIT:100> , with_bias = False ) ) <EOL> model . add ( bb8 . BatchNormalization ( <NUM_LIT:100> ) ) <EOL> model . add ( bb8 . ReLU ( ) ) <EOL> model . add ( bb8 . Dropout ( <NUM_LIT:0.5> ) ) <EOL> model . add ( bb8 . Linear ( <NUM_LIT:100> , <NUM_LIT:10> ) ) <EOL> model . add ( bb8 . SoftMax ( ) ) <EOL> return model </s>
