Currently am trying to train a multi task Deep learning model. I have images in a CSV with there corresponding severity labels bas well as multiple bounding boxes for each image. In my network am using one head for image classification and the other head for object detection basing on yolov3. It should be noted that the full image classification is independent of the object detection. Though I intend to use the model to obtain a multi task Deep learning model. Please help me figure out how to get a data generator that is suitable for this task. The script for the code is as shown below you can just view it and see the error =. https://colab.research.google.com/drive/1gH6lw_XM4yff1fXsrWGdhA95bZQ1RUlJ?usp=sharing
Epoch 1/500 ...... InvalidArgumentError: logits and labels must have the same first dimension, got logits shape [2,4] and labels shape [20480] [[node sparse_categorical_crossentropy/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits (defined at /usr/local/lib/python3.7/dist-packages/keras/backend.py:5114) ]] [Op:__inference_train_function_55053] Errors may have originated from an input operation. Input Source operations connected to node