class_docstr: Unit tests for the pennylane.qnn.keras.KerasLayer class.
class_docstr_tok: ["Unit","tests","for","the","pennylane.qnn.keras.KerasLayer","class","."]
docstr: Test if the compute_output_shape() method performs correctly, i.e., that it replaces
  the last element in the input_shape tuple with the specified output_dim and that the
  output shape is of type tf.TensorShape
docstr_tok: ["Test","if","the","compute_output_shape","(",")","method","performs","correctly",",","i.e.",",","that","it","replaces","the","last","element","in","the","input_shape","tuple","with","the","specified","output_dim","and","that","the","output","shape","is","of","type","tf.TensorShape"]
code: def test_compute_output_shape(
      self, get_circuit, output_dim, input_shape
  ):  # pylint: disable=no-self-use
      """Test if the compute_output_shape() method performs correctly, i.e., that it replaces
      the last element in the input_shape tuple with the specified output_dim and that the
      output shape is of type tf.TensorShape"""
      c, w = get_circuit
      layer = KerasLayer(c, w, output_dim)
  
      assert layer.compute_output_shape(input_shape) == (
          input_shape[0],
          output_dim,
      )
      assert isinstance(
          layer.compute_output_shape(input_shape), tf.TensorShape
      )
  
imports: from collections import defaultdict
  import numpy
  import pytest
  import pennylane
label_desc: Use image node_id 12 for calling the TestKerasLayer obj's underlying member method code with example usage: obj.test_compute_output_shape(get_circuit, output_dim, input_shape) without return types