<s> from collections import OrderedDict <EOL> import theano <EOL> import theano . tensor as T <EOL> from . . import utils <EOL> from . base import Layer <EOL> __all__ = [ <EOL> "<STR_LIT>" , <EOL> ] <EOL> class InputLayer ( Layer ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , shape , input_var = None , name = None , ** kwargs ) : <EOL> self . shape = shape <EOL> if any ( d is not None and d <= <NUM_LIT:0> for d in self . shape ) : <EOL> raise ValueError ( ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) % ( <EOL> self . shape , name ) ) <EOL> ndim = len ( shape ) <EOL> if input_var is None : <EOL> input_var_type = T . TensorType ( theano . config . floatX , [ False ] * ndim ) <EOL> var_name = ( "<STR_LIT>" % name ) if name is not None else "<STR_LIT:input>" <EOL> input_var = input_var_type ( var_name ) <EOL> else : <EOL> if input_var . ndim != ndim : <EOL> raise ValueError ( "<STR_LIT>" <EOL> "<STR_LIT>" % ( ndim , input_var . ndim ) ) <EOL> self . input_var = input_var <EOL> self . name = name <EOL> self . params = OrderedDict ( ) <EOL> @ Layer . output_shape . getter <EOL> def output_shape ( self ) : <EOL> return self . shape </s>
