code: def test_transform_affine_errors(self):
      import lasagne
  
      with pytest.raises(ValueError):
          l_in_a = lasagne.layers.InputLayer((None, 3, 28, 28))
          l_loc_a = lasagne.layers.DenseLayer(l_in_a, num_units=5)
          l_trans = lasagne.layers.TransformerLayer(l_in_a, l_loc_a)
      with pytest.raises(ValueError):
          l_in_b = lasagne.layers.InputLayer((3, 28, 28))
          l_loc_b = lasagne.layers.DenseLayer(l_in_b, num_units=6)
          l_trans = lasagne.layers.TransformerLayer(l_in_b, l_loc_b)
  
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 1 for calling the TestTransformLayer obj's underlying member method code with example usage: obj.test_transform_affine_errors() without return types