TfLiteGpuDelegate Prepare: delegate is not initialized
Hi @ZTMIDGO 

We see that you are using old version of tensorflow (1.x) which is not actively supported. 

We recommend that you upgrade to 2.13.0 and let us know if the issue still persists in newer versions .

Thanks.
 @pjpratik 
Sorry, I filled in the wrong tensorflow version, I'm currently using v2.13.0

implementation 'org.tensorflow:tensorflow-lite-gpu:2.13.0'
implementation 'org.tensorflow:tensorflow-lite:2.13.0'
implementation 'org.tensorflow:tensorflow-lite-gpu-api:2.13.0'
implementation 'org.tensorflow:tensorflow-lite-support:0.4.4'

I don't know how to handle the exception I mentioned above Hi @ZTMIDGO 

Thanks for the information.

I have inspected the the .pb file and tflite file. I can observe that there could be some runtime incompatibility happening.

The original model seems to be a TF 1.x version, specifically TF 1.13.1 because of which the issue seems to happen. Please find this [gist](https://colab.research.google.com/gist/pjpratik/807d47d204c1127f1c8be238e4ef9cf5/61979.ipynb).

Also, `from_frozen_graph()` conversion method is deprecated and please migrate the TF model to a 2.x version into a saved model format and try if it works.

Thanks. @pjpratik Thanks, I will try it
**System information**
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Android 12
- TensorFlow installed from (source or binary): binary
- TensorFlow version (or github SHA if from source): v2.13.0


**Provide the text output from tflite_convert**

```
# Copy and paste here
2023-09-26 13:31:37.492599: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-09-26 13:31:37.500521: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2168003d970 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2023-09-26 13:31:37.500975: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2023-09-26 13:31:37.599984: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:313] Ignored output_format.
2023-09-26 13:31:37.600138: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:316] Ignored drop_control_dependency.

```

**Standalone code to reproduce the issue** 
**java code**
Interpreter.Options options = new Interpreter.Options();
options.addDelegate(new GpuDelegate());
Interpreter  interpreter = new Interpreter(model, options);

**Convert code**
output_name = ['add_1']

input_shape = [288, 288, 3]

converter = tf.lite.TFLiteConverter.from_frozen_graph('model.pb', input_arrays=["input_image"], output_arrays=output_name, input_shapes={"input_image": input_shape})

tflite_model = converter.convert()
open('model.tflite', "wb").write(tflite_model)

GraphDef  model:
[GraphDef.zip](https://github.com/tensorflow/tensorflow/files/12723201/GraphDef.zip)

TFlite model:
[tflite.zip](https://github.com/tensorflow/tensorflow/files/12723204/tflite.zip)


**Any other info / logs**
**Java issue**
13:40:05.480  W  java.lang.IllegalArgumentException: Internal error: Failed to apply delegate: TfLiteGpuDelegate Init: DEPTHWISE_CONV_2D: ReadNonConstantTensor: value is a constant tensor: 4
13:40:05.480  W  TfLiteGpuDelegate Prepare: delegate is not initialized
13:40:05.480  W  Node number 69 (TfLiteGpuDelegateV2) failed to prepare.
13:40:05.480  W  Restored original execution plan after delegate application failure.
13:40:05.480  W  	at org.tensorflow.lite.NativeInterpreterWrapper.createInterpreter(Native Method)
13:40:05.480  W  	at org.tensorflow.lite.NativeInterpreterWrapper.init(NativeInterpreterWrapper.java:110)
13:40:05.480  W  	at org.tensorflow.lite.NativeInterpreterWrapper.<init>(NativeInterpreterWrapper.java:58)
13:40:05.480  W  	at org.tensorflow.lite.NativeInterpreterWrapperExperimental.<init>(NativeInterpreterWrapperExperimental.java:32)
13:40:05.480  W  	at org.tensorflow.lite.Interpreter.<init>(Interpreter.java:202)
13:40:05.480  W  	at com.unt.studio.pumpkin.core.style.DCTNet.init(DCTNet.java:33)
13:40:05.480  W  	at com.unt.studio.pumpkin.ui.fragment.StyleTransferFragment$1.run(StyleTransferFragment.java:184)
13:40:05.480  W  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
13:40:05.480  W  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
13:40:05.480  W  	at java.lang.Thread.run(Thread.java:920)