def rrelu(layer, **kwargs):
 nonlinearity = getattr(layer, 'nonlinearity', None)
 if (nonlinearity is not None):
  layer.nonlinearity = nonlinearities.identity
 return RandomizedRectifierLayer(layer, **kwargs)

def rrelu ( layer , ** kwargs ) : nonlinearity = getattr ( layer , 'nonlinearity' , None ) if ( nonlinearity is not None ) : layer . nonlinearity = nonlinearities . identity return RandomizedRectifierLayer ( layer , ** kwargs )
convenience function to apply randomized rectify to a given layers output .