class_docstr: Tests KerasLayer in an all-Keras environment.
class_docstr_tok: ["Tests","KerasLayer","in","an","all-Keras","environment","."]
code: def testComputeOutputShapeDifferentDtypes(self, save_from_keras):
      export_dir = os.path.join(self.get_temp_dir(), "2d-text-embed")
      _save_2d_text_embedding(
          export_dir, save_from_keras=save_from_keras
      )
      # Output shape is required when computing output shape with dtypes that
      # don't match.
      layer = hub.KerasLayer(export_dir, output_shape=(2,))
  
      self.assertEqual(
          [None, 2], layer.compute_output_shape((None, 1)).as_list()
      )
      self.assertEqual(
          [3, 2], layer.compute_output_shape((3, 1)).as_list()
      )
  
imports: import json
  import os
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_hub
label_desc: Use image node_id 9 for calling the KerasTest obj's underlying member method code with example usage: obj.testComputeOutputShapeDifferentDtypes(save_from_keras) without return types