docstr: A simple Logistic Regression Keras model.
docstr_tok: ["A","simple","Logistic","Regression","Keras","model","."]
code: def testDynamicEmbeddingKerasInterface_KerasModel(self):
      """A simple Logistic Regression Keras model."""
      string_ids = np.array([["yes"], ["no"], ["good"], ["bad"]])
      y_train = np.array([[[1, 0]], [[0, 1]], [[1, 0]], [[0, 1]]])
  
      model = tf.keras.models.Sequential(
          [
              de_ops.DynamicEmbeddingLookup(
                  self._config,
                  "embed",
                  service_address=self._kbs_address,
              ),
              tf.keras.layers.Dense(2, activation="softmax"),
          ]
      )
      model.compile(
          optimizer="sgd",
          loss="categorical_crossentropy",
          metrics=["accuracy"],
      )
      history = model.fit(string_ids, y_train, epochs=10)
      # Checks that the loss is decreased.
      self.assertLess(
          history.history["loss"][-1], history.history["loss"][0]
      )
  
imports: import itertools
  from absl.testing import parameterized
  from research.carls import context
  from research.carls import dynamic_embedding_ops
  from research.carls.testing import test_util
  import numpy
  import tensorflow
label_desc: Use image node_id 12 for calling the DynamicEmbeddingOpsTest obj's underlying member method code with example usage: obj.testDynamicEmbeddingKerasInterface_KerasModel() without return types