<s> """<STR_LIT>""" <EOL> from neon import NervanaObject <EOL> from neon . util . argparser import NeonArgparser <EOL> from neon . initializers import Gaussian <EOL> from neon . layers import Conv , Pooling , GeneralizedCost , Affine <EOL> from neon . optimizers import GradientDescentMomentum , MultiOptimizer , Schedule <EOL> from neon . transforms import Rectlin , Softmax , CrossEntropyMulti <EOL> from neon . models import Model <EOL> from neon . data import ArrayIterator <EOL> import numpy as np <EOL> parser = NeonArgparser ( __doc__ ) <EOL> args = parser . parse_args ( ) <EOL> NervanaObject . be . enable_winograd = <NUM_LIT:4> <EOL> X_train = np . random . uniform ( - <NUM_LIT:1> , <NUM_LIT:1> , ( <NUM_LIT> , <NUM_LIT:3> * <NUM_LIT> * <NUM_LIT> ) ) <EOL> y_train = np . random . uniform ( - <NUM_LIT:1> , <NUM_LIT:1> , ( <NUM_LIT> , <NUM_LIT:1000> ) ) <EOL> train = ArrayIterator ( X_train , y_train , nclass = <NUM_LIT:1000> , lshape = ( <NUM_LIT:3> , <NUM_LIT> , <NUM_LIT> ) ) <EOL> layers = [ Conv ( ( <NUM_LIT:11> , <NUM_LIT:11> , <NUM_LIT> ) , init = Gaussian ( scale = <NUM_LIT> ) , <EOL> activation = Rectlin ( ) , padding = <NUM_LIT:0> , strides = <NUM_LIT:4> ) , <EOL> Pooling ( <NUM_LIT:2> , strides = <NUM_LIT:2> ) , <EOL> Conv ( ( <NUM_LIT:5> , <NUM_LIT:5> , <NUM_LIT> ) , init = Gaussian ( scale = <NUM_LIT> ) , activation = Rectlin ( ) , padding = <NUM_LIT:0> ) , <EOL> Pooling ( <NUM_LIT:2> , strides = <NUM_LIT:2> ) , <EOL> Conv ( ( <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT> ) , init = Gaussian ( scale = <NUM_LIT> ) , activation = Rectlin ( ) , padding = <NUM_LIT:1> ) , <EOL> Conv ( ( <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT> ) , init = Gaussian ( scale = <NUM_LIT> ) , activation = Rectlin ( ) , padding = <NUM_LIT:1> ) , <EOL> Conv ( ( <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT> ) , init = Gaussian ( scale = <NUM_LIT> ) , activation = Rectlin ( ) , padding = <NUM_LIT:1> ) , <EOL> Pooling ( <NUM_LIT:2> , strides = <NUM_LIT:2> ) , <EOL> Affine ( nout = <NUM_LIT> , init = Gaussian ( scale = <NUM_LIT> ) , activation = Rectlin ( ) ) , <EOL> Affine ( nout = <NUM_LIT> , init = Gaussian ( scale = <NUM_LIT> ) , activation = Rectlin ( ) ) , <EOL> Affine ( nout = <NUM_LIT:1000> , init = Gaussian ( scale = <NUM_LIT> ) , activation = Softmax ( ) ) ] <EOL> model = Model ( layers = layers ) <EOL> weight_sched = Schedule ( [ <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ] , ( <NUM_LIT:1> / <NUM_LIT> ) ** ( <NUM_LIT:1> / <NUM_LIT> ) ) <EOL> opt_gdm = GradientDescentMomentum ( <NUM_LIT> , <NUM_LIT:0.0> , wdecay = <NUM_LIT> , schedule = weight_sched ) <EOL> opt = MultiOptimizer ( { '<STR_LIT:default>' : opt_gdm } ) <EOL> cost = GeneralizedCost ( costfunc = CrossEntropyMulti ( ) ) <EOL> model . benchmark ( train , cost = cost , optimizer = opt , niterations = <NUM_LIT:10> , nskip = <NUM_LIT:1> ) </s>
