keras-cv icon indicating copy to clipboard operation
keras-cv copied to clipboard

ValueError: Exception encountered when calling layer 'retina_net_label_encoder_3 using GPU on Object detection tutorial

Open stephentyers1975 opened this issue 2 years ago • 3 comments

Hi,

I'm trying to follow your object detection tutorial using a GPU enabled colab and I keep getting the below error when ever I run a model.predict or model.train. The datasets and their tensors all look fine in terms of shape and type. The error looks like it is reporting a None type being passed to retina_net_label_encoder_2, although i'm not sure. I'm really stuck here and haven't managed to complete this official guide with a GPU. This seems to work with a TPU and dense boxes instead of ragged.

Any guidence would be much appreciated as I need to be able to use a GPU. Many thanks as always Steve

Screenshot 2023-07-25 at 12 24 15 Screenshot 2023-07-25 at 12 24 37 Screenshot 2023-07-25 at 12 31 47

stephentyers1975 avatar Jul 25 '23 11:07 stephentyers1975

Looks like we'll have to update this notebook for multibackend Keras as you are hitting a lot of new bugs.

jbischof avatar Jul 25 '23 13:07 jbischof

@jbischof Okay cool, thanks for letting me know.

stephentyers1975 avatar Jul 25 '23 14:07 stephentyers1975

Hi, I am facing something similar with YOLOv8. Any update on this?

[My model was working before Christmas]

Dimension 1 in both shapes must be equal, but are 40 and 39. Shapes are [8,40,40] and [8,39,39]. for '{{node yolov8_detector/tf.concat_5/concat}} = ConcatV2[N=2, T=DT_FLOAT, Tidx=DT_INT32](yolov8_detector/tf.repeat_1/Repeat/Reshape_1, yolov8_detector/model/stack3_c2f_output/IdentityN, yolov8_detector/tf.concat_5/concat/axis)' with input shapes: [8,40,40,256], [8,39,39,128], [] and with computed input tensors: input[2] = <-1>.
    
    Call arguments received by layer 'tf.concat_5' (type TFOpLambda):
      • values=['tf.Tensor(shape=(8, 40, 40, 256), dtype=float32)', 'tf.Tensor(shape=(8, 39, 39, 128), dtype=float32)']
      • axis=-1
      • name=concat

snapchaturvedi avatar Dec 27 '23 02:12 snapchaturvedi

Thanks for reporting the issue! We have consolidated the development of KerasCV into the new KerasHub package, which supports image, text, and multi-modal models. Please read the announcement. KerasHub will support all the core functionality of KerasCV.

KerasHub can be installed with !pip install -U keras-hub. Documentation and guides are available at keras.io/keras_hub.

With our focus shifted to KerasHub, we are not planning any further development or releases in KerasCV. If you encounter a KerasCV feature that is missing from KerasHub, or would like to propose an addition to the library, please file an issue with KerasHub.

sachinprasadhs avatar May 07 '25 22:05 sachinprasadhs

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar May 22 '25 02:05 github-actions[bot]

This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.

github-actions[bot] avatar Jun 05 '25 02:06 github-actions[bot]