class_docstr: Unit test class for testing scikit-learn converter.
class_docstr_tok: ["Unit","test","class","for","testing","scikit-learn","converter","."]
code: def test_conv1d_lstm(self):
      from keras.layers import Conv1D, LSTM, Dense
  
      model = Sequential()
      # input_shape = (time_step, dimensions)
      model.add(Conv1D(32, 3, padding="same", input_shape=(10, 8)))
      # conv1d output shape = (None, 10, 32)
      model.add(LSTM(24))
      model.add(Dense(1, activation="sigmoid"))
  
      input_names = ["input"]
      output_names = ["output"]
      spec = keras.convert(model, input_names, output_names).get_spec()
  
      self.assertIsNotNone(spec)
      self.assertTrue(spec.HasField("neuralNetwork"))
  
      # Test the inputs and outputs
      self.assertEquals(
          len(spec.description.input), len(input_names) + 2
      )
      self.assertEquals(
          len(spec.description.output), len(output_names) + 2
      )
  
      # Test the layer parameters.
      layers = spec.neuralNetwork.layers
      self.assertIsNotNone(layers[0].convolution)
      self.assertIsNotNone(layers[1].simpleRecurrent)
      self.assertIsNotNone(layers[2].innerProduct)
  
imports: import unittest
  from coremltools._deps import _HAS_KERAS2_TF
  from coremltools.proto import Model_pb2
  from coremltools.proto import FeatureTypes_pb2
  from coremltools.proto import NeuralNetwork_pb2
  import pytest
label_desc: Use image node_id 20 for calling the KerasSingleLayerTest obj's underlying member method code with example usage: obj.test_conv1d_lstm() without return types