<s> import cudarray as ca <EOL> from . base import Op , NoBPropMixin <EOL> class Normal ( Op , NoBPropMixin ) : <EOL> bpropable = False <EOL> def __init__ ( self , shape , mu = <NUM_LIT:0.0> , sigma = <NUM_LIT:1.0> ) : <EOL> self . shape = shape <EOL> self . mu = mu <EOL> self . sigma = sigma <EOL> self . array = ca . zeros ( self . shape ) <EOL> def fprop ( self ) : <EOL> self . array = ca . random . normal ( loc = self . mu , scale = self . sigma , <EOL> size = self . shape ) <EOL> class Uniform ( Op , NoBPropMixin ) : <EOL> bpropable = False <EOL> def __init__ ( self , shape , low = <NUM_LIT:0.0> , high = <NUM_LIT:1.0> ) : <EOL> self . shape = shape <EOL> self . low = low <EOL> self . high = high <EOL> self . array = ca . zeros ( self . shape ) <EOL> def fprop ( self ) : <EOL> self . array = ca . random . uniform ( low = self . low , high = self . high , <EOL> size = self . shape ) <EOL> def normal ( loc = <NUM_LIT:0> , scale = <NUM_LIT:1.0> , size = None ) : <EOL> return Normal ( size , loc , scale ) <EOL> def uniform ( low = <NUM_LIT:0> , high = <NUM_LIT:1.0> , size = None ) : <EOL> return Uniform ( size , low , high ) </s>
