<s> import random <EOL> import numpy <EOL> import theano <EOL> import model <EOL> m = model . Model ( artificial_font = True ) <EOL> m . try_load ( ) <EOL> run_fn = m . get_run_fn ( ) <EOL> W = m . get_font_embeddings ( ) <EOL> a , b , c , d = [ random . choice ( W ) for z in xrange ( <NUM_LIT:4> ) ] <EOL> grid = <NUM_LIT:10> <EOL> batch_is = numpy . zeros ( ( grid * grid , m . d ) , dtype = theano . config . floatX ) <EOL> batch_js = numpy . zeros ( ( grid * grid , ) , dtype = numpy . int32 ) <EOL> for x in xrange ( grid ) : <EOL> for y in xrange ( grid ) : <EOL> z = y * grid + x <EOL> p , q = <NUM_LIT:1.0> * x / ( grid - <NUM_LIT:1> ) , <NUM_LIT:1.0> * y / ( grid - <NUM_LIT:1> ) <EOL> batch_is [ z ] = p * q * a + ( <NUM_LIT:1> - p ) * q * b + p * ( <NUM_LIT:1> - q ) * c + ( <NUM_LIT:1> - p ) * ( <NUM_LIT:1> - q ) * d <EOL> batch_js [ z ] = <NUM_LIT> <EOL> pred = run_fn ( batch_is , batch_js ) <EOL> model . draw_grid ( pred , grid ) . save ( '<STR_LIT>' ) </s>
