title: tensorflow Cannot convert a Tensor of dtype resource to a NumPy array. Tflite
body: <p>I have trained a network(git link below) and saved in the  saved model format. And would like to convert it to tflite. I am using python API for tflite coverter(<code>tflite.py</code> in git link below). But I'am not able to do so.</p>
  
  <p>System information:<br>
  <strong>OS Platform and Distribution:</strong> Ubuntu 18.04.3 LTS<br>
  <strong>TensorFlow version:</strong> tensorflow/tensorflow:2.2.0-gpu  (docker)</p>
  
  <p><a href="https://github.com/uidchet/tflite-issue" rel="nofollow noreferrer">The link</a> to network and save model code.</p>
  
  <p>The output from the converter invocation:    </p>
  
  <pre><code>File "tflite.py", line 22, in convert_model
    tflite_model = converter.convert()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/lite/python/lite.py", line 459, in convert
    self._funcs[0], lower_control_flow=False))
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/convert_to_constants.py", line 706, in convert_variables_to_constants_v2_as_graph
    func, lower_control_flow, aggressive_inlining)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/convert_to_constants.py", line 457, in _convert_variables_to_constants_v2_impl
    tensor_data = _get_tensor_data(func)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/convert_to_constants.py", line 217, in _get_tensor_data
    data = val_tensor.numpy()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 961, in numpy
    maybe_arr = self._numpy()  # pylint: disable=protected-access
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 929, in _numpy
    six.raise_from(core._status_to_exception(e.code, e.message), None)
  File "&lt;string&gt;", line 3, in raise_from
  tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot convert a Tensor of dtype resource to a NumPy array.
  </code></pre>
  
  <p><a href="https://github.com/uidchet/tflite-issue/blob/master/sav_model.zip" rel="nofollow noreferrer">The link</a> to the saved model</p>