keras-team / keras-cv

Industry-strength Computer Vision workflows with Keras
Other
999 stars 329 forks source link

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

Open stephentyers1975 opened 1 year ago

stephentyers1975 commented 1 year ago

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
jbischof commented 1 year ago

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

stephentyers1975 commented 1 year ago

@jbischof Okay cool, thanks for letting me know.

snapchaturvedi commented 8 months ago

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