Open phucnsp opened 3 years ago
@phucnsp can you elaborate how you 'removed' the position embedding?
I just remove this line below (see. layoutlm/modeling/layoutlm.py)
@phucnsp Removing the 1d positional embeddings will perform better on some tasks while worse on other tasks. It depends on what task you are working on. Please feel free to remove it if you find the results are better.
Describe Model I am using LayoutLM.
"Position embedding" used in layoutlm is borrowed from standard transformer architecture. However, in the case of layoutlm when bounding boxes' embeddings are introduced into, should we remove the position embedding?
I have removed it out and the performance even better. But I am not sure whether there is any hidden trade-off here.