docstr: Older versions of TensorFlow required custom layers to implement the
  `compute_output_shape` method. If it was not implemented, calling its
  `compute_output_shape` would throw a `NotImplementedError` exception.
  We cannot reproduce this behavior in newer versions of TensorFlow,
  so we manually throw this exception to simulate this behavior.
docstr_tok: ["Older","versions","of","TensorFlow","required","custom","layers","to","implement","the","`","compute_output_shape","`","method",".","If","it","was","not","implemented",",","calling","its","`","compute_output_shape","`","would","throw","a","`","NotImplementedError","`","exception",".","We","can","not","reproduce","this","behavior","in","newer","versions","of","TensorFlow",",","so","we","manually","throw","this","exception","to","simulate","this","behavior","."]
code: def compute_output_shape(self, input_shape):
      """
      Older versions of TensorFlow required custom layers to implement the
      `compute_output_shape` method. If it was not implemented, calling its
      `compute_output_shape` would throw a `NotImplementedError` exception.
      We cannot reproduce this behavior in newer versions of TensorFlow,
      so we manually throw this exception to simulate this behavior.
      """
      raise NotImplementedError()
  
imports: from unittest import TestCase
  import tempfile
  import operator
  import numpy
  import tensorflow
  import pytest
  from tensorflow.keras.metrics import MeanSquaredError, CategoricalAccuracy
  from tensorflow.keras import layers, Model
  from tensorflow.keras.applications import MobileNetV2
  from bigdl.nano.tf.keras import InferenceOptimizer
label_desc: Use image node_id 3 for calling the MyModelCannotComputeOutputShape obj's underlying member method code with example usage: obj.compute_output_shape(input_shape) without return types