code: def test_reshape_layer_model(backend_default, fargs):
      """
      test cases:
      - conv before RNNs
      - conv after RNNs
      - conv after LUT
      """
      np.random.seed(seed=0)
  
      nin, nout, bsz = fargs
      be = backend_default
      be.bsz = bsz
      input_size = (nin, be.bsz)
  
      init = Uniform(-0.1, 0.1)
      g_uni = GlorotUniform()
  
      inp_np = np.random.rand(nin, be.bsz)
      delta_np = np.random.rand(nout, be.bsz)
  
      inp = be.array(inp_np)
      delta = be.array(delta_np)
  
      conv_lut_1 = [
          LookupTable(vocab_size=2000, embedding_dim=400, init=init),
          Reshape(reshape=(4, 100, -1)),
          Conv((3, 3, 16), init=init),
          LSTM(
              64,
              g_uni,
              activation=Tanh(),
              gate_activation=Logistic(),
              reset_cells=True,
          ),
          RecurrentSum(),
          Affine(nout, init, bias=init, activation=Softmax()),
      ]
  
      conv_lut_2 = [
          LookupTable(vocab_size=1000, embedding_dim=400, init=init),
          Reshape(reshape=(4, 50, -1)),
          Conv((3, 3, 16), init=init),
          Pooling(2, strides=2),
          Affine(nout=nout, init=init, bias=init, activation=Softmax()),
      ]
  
      conv_rnn_1 = [
          LookupTable(vocab_size=2000, embedding_dim=400, init=init),
          LSTM(
              64,
              g_uni,
              activation=Tanh(),
              gate_activation=Logistic(),
              reset_cells=True,
          ),
          Reshape(reshape=(4, 32, -1)),
          Conv((3, 3, 16), init=init),
          Affine(nout, init, bias=init, activation=Softmax()),
      ]
  
      conv_rnn_2 = [
          LookupTable(vocab_size=2000, embedding_dim=400, init=init),
          Recurrent(64, g_uni, activation=Tanh(), reset_cells=True),
          Reshape(reshape=(4, -1, 32)),
          Conv((3, 3, 16), init=init),
          Affine(nout, init, bias=init, activation=Softmax()),
      ]
  
      lut_sum_1 = [
          LookupTable(vocab_size=1000, embedding_dim=128, init=init),
          RecurrentSum(),
          Affine(nout=nout, init=init, bias=init, activation=Softmax()),
      ]
  
      lut_birnn_1 = [
          LookupTable(vocab_size=1000, embedding_dim=200, init=init),
          DeepBiRNN(
              32,
              init=GlorotUniform(),
              batch_norm=True,
              activation=Tanh(),
              reset_cells=True,
              depth=1,
          ),
          Reshape((4, 32, -1)),
          Conv((3, 3, 16), init=init),
          Affine(nout=nout, init=init, bias=init, activation=Softmax()),
      ]
  
      layers_test = [
          conv_lut_1,
          conv_lut_2,
          conv_rnn_1,
          conv_rnn_2,
          lut_sum_1,
          lut_birnn_1,
      ]
  
      for lg in layers_test:
          model = Model(layers=lg)
          cost = GeneralizedCost(costfunc=CrossEntropyBinary())
          model.initialize(input_size, cost)
          model.fprop(inp)
          model.bprop(delta)
  
file_path: neon/tests/test_reshape_layer.py
imports: import numpy
  import itertools
  from neon.backends import gen_backend
  from neon.initializers import Uniform, GlorotUniform
  from neon.layers import LSTM, Affine, LookupTable, RecurrentSum, Recurrent, Conv, GeneralizedCost, Pooling, DeepBiRNN, Reshape
  from neon.transforms import Logistic, Tanh, Softmax, CrossEntropyBinary
  from neon.models import Model
label_desc: Use image node_id 3 for calling a global function with example usage: test_reshape_layer_model(backend_default, fargs) without return types