Hi,
I tried to found issue many times but I am not able to find it yet. I rerun the lab many times but I do not understand where is the problem. All outputs are according to expected output but when I predict it gives the following error. Please look the following:
Start fine-tuning!
ValueError Traceback (most recent call last)
in <cell line: 3>()
15
16 # Training step (forward pass + backwards pass)
—> 17 total_loss = train_step_fn(image_tensors,
18 gt_boxes_list,
19 gt_classes_list,
4 frames
/usr/local/lib/python3.10/dist-packages/object_detection/core/losses.py in if_body()
42 def if_body():
43 nonlocal target_tensor
—> 44 target_tensor = ag__.converted_call(ag__.ld(tf).where, (ag__.converted_call(ag__.ld(tf).is_nan, (ag__.ld(target_tensor),), None, fscope), ag__.ld(prediction_tensor), ag__.ld(target_tensor)), None, fscope)
45
46 def else_body():
ValueError: in user code:
File "<ipython-input-79-7eb5bf045b59>", line 52, in train_step_fn *
losses_dict = model.loss(prediction_dict, true_shape_tensor)
File "/usr/local/lib/python3.10/dist-packages/object_detection/meta_architectures/ssd_meta_arch.py", line 876, in loss *
location_losses = self._localization_loss(
File "/usr/local/lib/python3.10/dist-packages/object_detection/core/losses.py", line 78, in __call__ *
target_tensor = tf.where(tf.is_nan(target_tensor),
ValueError: Shapes must be equal rank, but are 3 and 1 for '{{node Loss/Loss/Select}} = Select[T=DT_FLOAT](Loss/Loss/IsNan, concat_1, Loss/stack_2)' with input shapes: [0], [4,51150,4], [0].