Problem with MobileNetV2

Getting this error while training dataset on MobileNetV2 SSD FPN-Lite 320x320

Traceback (most recent call last):
File “/home/train.py”, line 255, in
main_function()
File “/home/train.py”, line 183, in main_function
model, override_mode, disable_per_channel_quantization, akida_model, akida_edge_model = train_model(train_dataset, validation_dataset,
File “/home/train.py”, line 127, in train_model
ei_tensorflow.object_detection.train(classes, LEARNING_RATE, EPOCHS,
File “/app/./resources/libraries/ei_tensorflow/object_detection.py”, line 110, in train
run_loop(num_epochs, train_dataset, num_classes, train_step_fn, validation_dataset, validation_fn,
File “/app/./resources/libraries/ei_tensorflow/object_detection.py”, line 141, in run_loop
gt_boxes_list = [boxes.to_tensor(shape=[None, 4]) for boxes in batch[1][0]]
File “/app/./resources/libraries/ei_tensorflow/object_detection.py”, line 141, in
gt_boxes_list = [boxes.to_tensor(shape=[None, 4]) for boxes in batch[1][0]]
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py”, line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/ops/ragged/row_partition.py”, line 634, in from_uniform_row_length
raise ValueError(
ValueError: uniform_row_length=4 times nrows=2 must equal nvals=16
Application exited with code 1

Project ID: 294593

Edit: Updated Project ID

Can some one help me in this regard

Hi @Athern

You are hitting a common problem when getting started where the learn block is expecting to receive a tensor of a certain shape, but you have added too many processing blocks or removed and recreated one.

When Processing and Learn blocks are added and removed without rebuilding and reselecting the parameters that are going to be passed from processing to learn block. That is related to the shape of the tensor the neural network is expecting to receive in the learn block.

You will be best to delete those blocks and start again.

Hope this helps!

Best

Eoin

1 Like