RuntimeError: CUDA error: device-side assert triggered, LayoutLM Fine-Tuning

In the layoutlm.py script, the embedding layer is used in the LayoutlmEmbeddings class and there are no labels in the embedding layer. The input tensors were:

input_ids, bbox, token_type_ids, position_ids, input_embeds.

The min max of the values were:

Input IDs: (0, 29656)
BBox: (0, 1000)
Token Type IDs: (0, 0)
Position IDs: (0, 511)
# The input_embeds returns `None`