code: def test_gated_average_layer_exceptions(self):
      networks = layers.parallel(
          layers.Input((10, 3, 3)),
          layers.Input(20) >> layers.Relu(8),
          layers.Input(20) >> layers.Relu(8),
      )
      error_message = "should be 2-dimensional"
      with self.assertRaisesRegexp(LayerConnectionError, error_message):
          layers.join(networks, layers.GatedAverage())
  
      networks = layers.parallel(
          layers.Input(10) >> layers.Softmax(3),
          layers.Input(20) >> layers.Relu(8),
          layers.Input(20) >> layers.Relu(8),
      )
      error_message = "only 3 networks, got 2 networks"
      with self.assertRaisesRegexp(LayerConnectionError, error_message):
          layers.join(networks, layers.GatedAverage())
  
      networks = layers.parallel(
          layers.Input(10) >> layers.Softmax(2),
          layers.Input(20) >> layers.Relu(8),
          layers.Input(20) >> layers.Relu(10),
      )
      error_message = "expect to have the same shapes"
      with self.assertRaisesRegexp(LayerConnectionError, error_message):
          layers.join(networks, layers.GatedAverage())
  
file_path: neupy/tests/layers/test_gated_average.py
imports: import numpy
  from neupy import layers
  from neupy.utils import asfloat
  from neupy.exceptions import LayerConnectionError
  from base import BaseTestCase
label_desc: Use image node_id 4 for calling the GatedAverageTestCase obj's underlying member method code with example usage: obj.test_gated_average_layer_exceptions() without return types