Error : Training output

I’m new to this and I hope someone can help, Please

I got an error when I am trying to train FOMO model to recognize digits on screen. I start the training and I get the following error:

Creating job… OK (ID: 5780344)

Scheduling job in cluster…
Job started
Scheduling job in cluster…
Job started
Splitting data into training and validation sets…
Splitting data into training and validation sets OK
Traceback (most recent call last):
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/data/util/structure.py”, line 106, in normalize_element
spec = type_spec_from_value(t, use_fallback=False)
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/data/util/structure.py”, line 489, in type_spec_from_value
raise TypeError(“Could not build a TypeSpec for {} with type {}”.format(
TypeError: Could not build a TypeSpec for [{‘sampleId’: 172885713, ‘boundingBoxes’: [{‘label’: 8, ‘x’: 34, ‘y’: 26, ‘w’: 3, ‘h’: 4}, {‘label’: 7, ‘x’: 31, ‘y’: 26, ‘w’: 2, ‘h’: 4}, {‘label’: 9, ‘x’: 32, ‘y’: 18, ‘w’: 4, ‘h’: 6}, {‘label’: 8, ‘x’: 27, ‘y’: 18, ‘w’: 4, ‘h’: 6}, {‘label’: 3, ‘x’: 32, ‘y’: 10, ‘w’: 3, ‘h’: 6}, {‘label’: 3, ‘x’: 27, ‘y’: 10, ‘w’: 4, ‘h’: 6}, {‘label’: 2, ‘x’: 26, ‘y’: 10, ‘w’: 1, ‘h’: 6}]},
‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’
a long long block…
.
.
.
‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’
, {‘sampleId’: 172885675, ‘boundingBoxes’: [{‘label’: 5, ‘x’: 35, ‘y’: 29, ‘w’: 2, ‘h’: 4}, {‘label’: 7, ‘x’: 32, ‘y’: 29, ‘w’: 2, ‘h’: 4}, {‘label’: 7, ‘x’: 33, ‘y’: 21, ‘w’: 4, ‘h’: 6}, {‘label’: 7, ‘x’: 29, ‘y’: 21, ‘w’: 3, ‘h’: 6}, {‘label’: 1, ‘x’: 33, ‘y’: 13, ‘w’: 4, ‘h’: 6}, {‘label’: 2, ‘x’: 31, ‘y’: 14, ‘w’: 1, ‘h’: 5}, {‘label’: 2, ‘x’: 27, ‘y’: 14, ‘w’: 1, ‘h’: 5}]}] with type list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/train.py”, line 321, in
main_function()
File “/home/train.py”, line 242, in main_function
train_dataset, validation_dataset, samples_dataset, X_train, X_test, Y_train, Y_test, has_samples, X_samples, Y_samples = ei_tensorflow.training.get_dataset_from_folder(
File “/app/./resources/libraries/ei_tensorflow/training.py”, line 190, in get_dataset_from_folder
train_dataset, validation_dataset, samples_dataset = get_datasets(X_train, Y_train, X_test, Y_test,
File “/app/./resources/libraries/ei_tensorflow/training.py”, line 347, in get_datasets
train_dataset = get_dataset_standard(X_train, Y_train)
File “/app/./resources/libraries/ei_tensorflow/training.py”, line 212, in get_dataset_standard
return tf.data.Dataset.from_tensor_slices((X_values, Y_values))
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/data/ops/dataset_ops.py”, line 781, in from_tensor_slices
return TensorSliceDataset(tensors, name=name)
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/data/ops/dataset_ops.py”, line 4661, in init
element = structure.normalize_element(element)
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/data/util/structure.py”, line 111, in normalize_element
ops.convert_to_tensor(t, name=“component_%d” % i))
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/profiler/trace.py”, line 163, in wrapped
return func(*args, **kwargs)
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/framework/ops.py”, line 1621, in convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py”, line 347, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py”, line 271, in constant
return _constant_impl(value, dtype, shape, name, verify_shape=False,
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py”, line 283, in _constant_impl
return _constant_eager_impl(ctx, value, dtype, shape, verify_shape)
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py”, line 308, in _constant_eager_impl
t = convert_to_eager_tensor(value, ctx, dtype)
File “/app/keras/.venv/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py”, line 106, in convert_to_eager_tensor
return ops.EagerTensor(value, ctx.device_name, dtype)
ValueError: Attempt to convert a value ({‘sampleId’: 172885713, ‘boundingBoxes’: [{‘label’: 8, ‘x’: 34, ‘y’: 26, ‘w’: 3, ‘h’: 4}, {‘label’: 7, ‘x’: 31, ‘y’: 26, ‘w’: 2, ‘h’: 4}, {‘label’: 9, ‘x’: 32, ‘y’: 18, ‘w’: 4, ‘h’: 6}, {‘label’: 8, ‘x’: 27, ‘y’: 18, ‘w’: 4, ‘h’: 6}, {‘label’: 3, ‘x’: 32, ‘y’: 10, ‘w’: 3, ‘h’: 6}, {‘label’: 3, ‘x’: 27, ‘y’: 10, ‘w’: 4, ‘h’: 6}, {‘label’: 2, ‘x’: 26, ‘y’: 10, ‘w’: 1, ‘h’: 6}]}) with an unsupported type (<class ‘dict’>) to a Tensor.
Application exited with code 1

Thanks.
papaaui

Hello @papaaui,

Can you share your project ID so I can check that everything is properly configured on your project?

Best,

Louis