docstr: Test that the RNN executor produces same results as
  the non-executor (i.e running step nets as sequence of simple nets).
docstr_tok: ["Test","that","the","RNN","executor","produces","same","results","as","the","non-executor","(","i.e","running","step","nets","as","sequence","of","simple","nets",")","."]
code: def test_lstm_equal_simplenet(
      self, num_layers, T, forward_only, gc, dc
  ):
      """
      Test that the RNN executor produces same results as
      the non-executor (i.e running step nets as sequence of simple nets).
      """
      self.Tseq = [T, T // 2, T // 2 + T // 4, T, T // 2 + 1]
  
      workspace.ResetWorkspace()
      with core.DeviceScope(gc):
          print(
              "Run with device: {}, forward only: {}".format(
                  gc, forward_only
              )
          )
  
          model, _ = self.init_lstm_model(T, num_layers, forward_only)
          self._compare(model, forward_only)
  
file_path: pytorch/caffe2/python/operator_test/recurrent_net_executor_test.py
imports: from caffe2.proto import caffe2_pb2
  from caffe2.python import model_helper, workspace, core, rnn_cell, test_util
  from caffe2.python.attention import AttentionType
  import numpy
  import unittest
  import caffe2.python.hypothesis_test_util
  import hypothesis.strategies
  from hypothesis import given, settings
label_desc: Use image node_id 5 for calling the TestRNNExecutor obj's underlying member method code with example usage: obj.test_lstm_equal_simplenet(num_layers, T, forward_only, gc, dc) without return types