code: def test_get_output_for(self, ParametricRectifierLayer, init_alpha):
      input_shape = (3, 3, 28, 28)
      # random input tensor
      input = np.random.randn(*input_shape).astype(theano.config.floatX)
  
      # default: alphas shared only along 2nd axis
      layer = ParametricRectifierLayer(input_shape, alpha=init_alpha)
      alpha_v = layer.alpha.get_value()
      expected = (
          np.maximum(input, 0)
          + np.minimum(input, 0) * alpha_v[None, :, None, None]
      )
      assert np.allclose(layer.get_output_for(input).eval(), expected)
  
      # scalar alpha
      layer = ParametricRectifierLayer(
          input_shape, alpha=init_alpha, shared_axes="all"
      )
      alpha_v = layer.alpha.get_value()
      expected = np.maximum(input, 0) + np.minimum(input, 0) * alpha_v
      assert np.allclose(layer.get_output_for(input).eval(), expected)
  
      # alphas shared over the 1st axis
      layer = ParametricRectifierLayer(
          input_shape, alpha=init_alpha, shared_axes=0
      )
      alpha_v = layer.alpha.get_value()
      expected = (
          np.maximum(input, 0)
          + np.minimum(input, 0) * alpha_v[None, :, :, :]
      )
      assert np.allclose(
          layer.get_output_for(input).eval(), expected, atol=1e-07
      )
  
      # alphas shared over the 1st and 4th axes
      layer = ParametricRectifierLayer(
          input_shape, shared_axes=(0, 3), alpha=init_alpha
      )
      alpha_v = layer.alpha.get_value()
      expected = (
          np.maximum(input, 0)
          + np.minimum(input, 0) * alpha_v[None, :, :, None]
      )
      assert np.allclose(layer.get_output_for(input).eval(), expected)
  
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 5 for calling the TestParametricRectifierLayer obj's underlying member method code with example usage: obj.test_get_output_for(ParametricRectifierLayer, init_alpha) without return types