code: def test_get_output_for(self, RandomizedRectifierLayer):
      input_shape = (3, 3, 28, 28)
  
      # ensure slope never exceeds [lower,upper)
      input = np.random.randn(*input_shape).astype(theano.config.floatX)
      layer = RandomizedRectifierLayer(input_shape, shared_axes=0)
      self.assert_between(
          layer, input, layer.get_output_for(input).eval()
      )
  
      # from here on, we want to check parameter sharing
      # this is easier to check if the input is all ones
      input = np.ones(input_shape).astype(theano.config.floatX) * -1
  
      # default: parameters shared along all but 2nd axis
      layer = RandomizedRectifierLayer(input_shape)
      out = layer.get_output_for(input).eval()
      assert [np.allclose(out.var(axis=a), 0) for a in range(4)] == [
          True,
          False,
          True,
          True,
      ]
  
      # share across all axes (single slope)
      layer = RandomizedRectifierLayer(input_shape, shared_axes="all")
      out = layer.get_output_for(input).eval()
      assert [np.allclose(out.var(axis=a), 0) for a in range(4)] == [
          True,
          True,
          True,
          True,
      ]
  
      # share across 1st axis
      layer = RandomizedRectifierLayer(input_shape, shared_axes=0)
      out = layer.get_output_for(input).eval()
      assert [np.allclose(out.var(axis=a), 0) for a in range(4)] == [
          True,
          False,
          False,
          False,
      ]
  
      # share across 1st and 4th axes
      layer = RandomizedRectifierLayer(input_shape, shared_axes=(0, 3))
      out = layer.get_output_for(input).eval()
      assert [np.allclose(out.var(axis=a), 0) for a in range(4)] == [
          True,
          False,
          False,
          True,
      ]
  
imports: from mock import Mock
  import numpy
  import pytest
  import theano
  from lasagne.layers import InputLayer, standardize, get_output, get_all_params
  from lasagne.utils import floatX
label_desc: Use image node_id 8 for calling the TestRandomizedRectifierLayer obj's underlying member method code with example usage: obj.test_get_output_for(RandomizedRectifierLayer) without return types