Skip to content

Added LayoutLMv3 #2178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ae79d15
added the files
carrycooldude Mar 30, 2025
737f03a
Restructure LayoutLMv3 implementation to match KerasHub style
carrycooldude Apr 25, 2025
455a140
Refactor: Move LayoutLMv3 files to models directory and make code bac…
carrycooldude Apr 27, 2025
d92c8c4
refactor: Move LayoutLMv3 files to dedicated directory
carrycooldude Apr 27, 2025
0948f95
fix: Update LayoutLMv3 init files to follow correct format
carrycooldude Apr 30, 2025
3c02f78
fix: Update LayoutLMv3 backbone to follow project standards
carrycooldude Apr 30, 2025
4a79d9b
refactor: remove unnecessary files and fix imports in LayoutLMv3 module
carrycooldude May 26, 2025
c2fed4c
Add minimal stub for LayoutLMv3TransformerLayer
carrycooldude May 29, 2025
e828047
fix: resolve merge conflicts and complete rebase
carrycooldude May 30, 2025
063054d
refactor(layoutlmv3): move usage examples to class docstrings and rem…
carrycooldude Jul 4, 2025
476c0fd
style: apply code formatting and lint fixes via pre-commit
carrycooldude Jul 4, 2025
4439fad
made some changes
carrycooldude Jul 7, 2025
ad3c758
resolve the conflict issue
carrycooldude Jul 7, 2025
885f2fe
chore: update API directory and fix ruff line length in checkpoint co…
carrycooldude Jul 7, 2025
5019abb
update models
carrycooldude Jul 7, 2025
e1fc266
made changes
carrycooldude Jul 7, 2025
a32555c
chore: trigger CI
carrycooldude Jul 7, 2025
a885afa
Update API files
carrycooldude Jul 7, 2025
ad004f7
changed
carrycooldude Jul 7, 2025
6fb0fdc
chore: pre-commit fixes for layoutlmv3 __init__.py
carrycooldude Jul 7, 2025
5aaadab
chore: commit api directory after pre-commit run
carrycooldude Jul 8, 2025
8c7e989
update models
carrycooldude Jul 8, 2025
5a371a5
update layoutlmv3
carrycooldude Jul 9, 2025
bcad8d7
Fix all LayoutLMv3 issues from PR review
carrycooldude Jul 22, 2025
ca96183
Final formatting fixes for CI/CD
carrycooldude Jul 22, 2025
9c90753
Fix final ruff formatting issues
carrycooldude Jul 22, 2025
cf4b20b
Fix PyTorch backend compatibility issues - Separate ops.arange and o…
carrycooldude Jul 22, 2025
193496a
Fix PyTorch compatibility and test implementation
carrycooldude Jul 22, 2025
4d8604e
Simplify tests and fix imports to isolate PyTorch backend issue
carrycooldude Jul 22, 2025
e07224c
Fix PyTorch backend compatibility issues
carrycooldude Jul 22, 2025
6187459
Auto-fix ruff formatting issues
carrycooldude Jul 22, 2025
00fc976
Simplify LayoutLMv3 to use standard KerasHub patterns
carrycooldude Jul 22, 2025
0d3099d
Trigger fresh push - LayoutLMv3 implementation complete
carrycooldude Jul 22, 2025
82b9b93
🔧 Enhance backend compatibility and error handling
carrycooldude Jul 22, 2025
e40a6a0
Add comprehensive import error handling and fallbacks
carrycooldude Jul 22, 2025
7796cbf
Fix all code formatting issues
carrycooldude Jul 22, 2025
ae239c7
Add LayoutLMv3 exports to public API
carrycooldude Jul 22, 2025
6671da2
Revert " Add LayoutLMv3 exports to public API"
carrycooldude Jul 22, 2025
f1ac61a
Fix CI issues: bash syntax, formatting, and API generation
carrycooldude Jul 24, 2025
c83c124
Remove manual API imports - let auto-generation handle it
carrycooldude Jul 24, 2025
2ff3157
Restructure LayoutLMv3 backbone following KerasHub patterns - Follow …
carrycooldude Jul 24, 2025
87359e5
Apply comprehensive LayoutLMv3 fixes from commit bcad8d7e
carrycooldude Jul 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions keras_hub/src/models/layoutlmv3/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from keras_hub.src.models.layoutlmv3.layoutlmv3_backbone import (
LayoutLMv3Backbone,
)
from keras_hub.src.models.layoutlmv3.layoutlmv3_presets import backbone_presets
from keras_hub.src.models.layoutlmv3.layoutlmv3_tokenizer import (
LayoutLMv3Tokenizer,
)
from keras_hub.src.utils.preset_utils import register_presets
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LayoutLMv3Tokenizer import is not required here


__all__ = [
"LayoutLMv3Backbone",
"LayoutLMv3Tokenizer",
"LayoutLMv3TransformerLayer",
]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove these lines

register_presets(backbone_presets, LayoutLMv3Backbone)
Loading
Loading