-
Notifications
You must be signed in to change notification settings - Fork 31.6k
[LayoutLMv3] Add TensorFlow implementation #18678
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
Merged
Merged
Changes from 135 commits
Commits
Show all changes
259 commits
Select commit
Hold shift + click to select a range
d66d9a1
add main layer
ChrisFugl 08205ff
add model
ChrisFugl 151a42b
add checkmark in support tables
ChrisFugl bd4ad93
add contributors githubs
ChrisFugl 4823e51
TensorFlow documentation
ChrisFugl 61180c1
Add token- and sequence classification models.
EtcEc ea1206c
add tf-layoutlmv3 to documentation tests
ChrisFugl 7dc9c9d
Merge branch 'add_tf_layoutlmv3' of github.com:ChrisFugl/transformers…
ChrisFugl 72341db
TFLayoutLMv3ForQuestionAnswering
lre 4e85b1d
add imports to model init file
ChrisFugl 1e8bfce
add imports to transformers init file
ChrisFugl 3821a01
add tf layoutlmv3 entries to auto model
ChrisFugl d79b737
dummy tf objects for layoutlmv3
ChrisFugl 3780c12
output hidden states of last layer
ChrisFugl 1feed36
auto styling
ChrisFugl eb92766
fix-copies
ChrisFugl 8ac52f7
typo of layoutlmv3 (was wrongly typed as layoutlm3)
ChrisFugl 440c122
Fix typo: "V3" --> "v3"
ChrisFugl 5cca1fb
Add skeleton for tests
ChrisFugl df911a3
Add support for both int32 and int64 inputs
ChrisFugl 773a8c2
Add huggingface profile links
ChrisFugl c80f25a
Test output shapes of various model types.
ChrisFugl 674d8a1
Add integration test
ChrisFugl 19d8735
Merge remote-tracking branch 'upstream/main' into add_tf_layoutlmv3
ChrisFugl 35611fc
make style
ChrisFugl 3a2f81e
make quality
ChrisFugl ad85647
Check init consistency
ChrisFugl 8af0241
Remove debug print statements.
ChrisFugl 70068a9
Merge remote-tracking branch 'upstream/main' into add_tf_layoutlmv3
ChrisFugl 4f08871
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl a64fed1
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 328c640
Remove shape_list dependency
ChrisFugl a3bc5ee
Merge remote-tracking branch 'upstream/main' into add_tf_layoutlmv3
ChrisFugl 6debe6f
Explicit naming of shape comments
ChrisFugl e89b303
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 1149aa0
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 16942d9
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 2d3f2a4
Merge branch 'add_tf_layoutlmv3' of github.com:ChrisFugl/transformers…
ChrisFugl 16bf1b1
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 593a9e1
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 222f643
Use LARGE_NEGATIVE instead of tf.experimental
ChrisFugl 0ad9969
Remove superfluous else statements
ChrisFugl 6435f28
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 1b607ba
Move get_int_dtype outside of the class
ChrisFugl d18bdf8
Merge branch 'add_tf_layoutlmv3' of github.com:ChrisFugl/transformers…
ChrisFugl e36e7f2
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl d637b99
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl a78ca4f
Update tests/models/layoutlmv3/test_modeling_tf_layoutlmv3.py
ChrisFugl 5872ad7
Add return types
ChrisFugl 53c7237
one-hot + dense instead of embedding
ChrisFugl 06b52fa
custom test_loss_computation
ChrisFugl adc56a5
Move get_int_dtype inline.
ChrisFugl 64bc4fa
Make relative_position_matrix function as inline code.
ChrisFugl afacd00
Merge remote-tracking branch 'upstream/main' into add_tf_layoutlmv3
ChrisFugl e45af6a
Merge remote-tracking branch 'upstream/main' into add_tf_layoutlmv3
ChrisFugl bf328fd
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl be2881f
Merge branch 'add_tf_layoutlmv3' of github.com:ChrisFugl/transformers…
ChrisFugl 937b4be
Add extended docstring
ChrisFugl 41c5231
Use integer division
ChrisFugl e24035f
Ignore position_ids from PyTorch model
ChrisFugl f0c8fea
embedding layers
ChrisFugl 0a6602e
pretrained model superclass
ChrisFugl c771190
self-attention layer
ChrisFugl 4859c82
self-output layer
ChrisFugl 9f3de75
attention layer
ChrisFugl cda7e40
intermediate layer
ChrisFugl faa6bc0
output layer
ChrisFugl d6e2f70
"encoder layer" layer
ChrisFugl a4de6f1
add encoder
ChrisFugl fae22b0
add main layer
ChrisFugl 5dd6f3e
add model
ChrisFugl ae1f7c9
add checkmark in support tables
ChrisFugl f446021
add contributors githubs
ChrisFugl ad40748
TensorFlow documentation
ChrisFugl 3d5a049
add tf-layoutlmv3 to documentation tests
ChrisFugl a7b0d8d
Add token- and sequence classification models.
EtcEc 23df6c7
TFLayoutLMv3ForQuestionAnswering
lre 3539f39
add imports to model init file
ChrisFugl 0244259
add imports to transformers init file
ChrisFugl 0947c32
add tf layoutlmv3 entries to auto model
ChrisFugl 07536ed
dummy tf objects for layoutlmv3
ChrisFugl 860c4f0
output hidden states of last layer
ChrisFugl e24c32d
auto styling
ChrisFugl a7aa12b
fix-copies
ChrisFugl f896881
typo of layoutlmv3 (was wrongly typed as layoutlm3)
ChrisFugl 8775c63
Fix typo: "V3" --> "v3"
ChrisFugl a86291a
Add skeleton for tests
ChrisFugl a8377eb
Add support for both int32 and int64 inputs
ChrisFugl 5da4229
Add huggingface profile links
ChrisFugl e15a2ad
Test output shapes of various model types.
ChrisFugl 1a0c359
Add integration test
ChrisFugl d1ab7ae
make style
ChrisFugl b3c0889
make quality
ChrisFugl 75cc112
Check init consistency
ChrisFugl 4a0675e
Remove debug print statements.
ChrisFugl f9a49cd
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl abe5c35
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 88a53da
Remove shape_list dependency
ChrisFugl efae185
Explicit naming of shape comments
ChrisFugl 88b0803
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 91d1f15
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl d29bbfd
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 5b75ad8
Use LARGE_NEGATIVE instead of tf.experimental
ChrisFugl 624c066
Remove superfluous else statements
ChrisFugl 64bc29c
Move get_int_dtype outside of the class
ChrisFugl 3f053c8
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 287a3f9
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl f912900
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 3dec3ac
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 91f2409
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl a0717af
Update tests/models/layoutlmv3/test_modeling_tf_layoutlmv3.py
ChrisFugl cdb4cdc
Add return types
ChrisFugl 3ae8a14
one-hot + dense instead of embedding
ChrisFugl eb23244
custom test_loss_computation
ChrisFugl 3022ee7
Move get_int_dtype inline.
ChrisFugl 0e242fe
Make relative_position_matrix function as inline code.
ChrisFugl 0384eeb
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 1a1eace
Add extended docstring
ChrisFugl eca932e
Use integer division
ChrisFugl 79ac465
Ignore position_ids from PyTorch model
ChrisFugl cecd6f4
Implicit zeros initialization
ChrisFugl 2fff986
Merge branch 'add_tf_layoutlmv3' of github.com:ChrisFugl/transformers…
ChrisFugl 3d2fc5a
dummy tf objects for layoutlmv3
ChrisFugl 73328c4
fix-copies
ChrisFugl e954136
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 366ed22
Add pixel_values type hint
ChrisFugl 4e68953
Merge remote-tracking branch 'upstream/main' into add_tf_layoutlmv3
ChrisFugl b2aa40b
Remove whitespace
ChrisFugl c333020
Remove duplicate dummy objects
ChrisFugl 25f9149
embedding layers
ChrisFugl ce15146
pretrained model superclass
ChrisFugl d1ddb6d
self-attention layer
ChrisFugl a69d345
self-output layer
ChrisFugl 8c44eb1
attention layer
ChrisFugl 43f58cc
intermediate layer
ChrisFugl 8999d2a
output layer
ChrisFugl c78a577
"encoder layer" layer
ChrisFugl 9431117
add encoder
ChrisFugl e2763e5
add main layer
ChrisFugl f9a6808
add model
ChrisFugl e2941fe
add checkmark in support tables
ChrisFugl 73fef45
add contributors githubs
ChrisFugl b97e52d
TensorFlow documentation
ChrisFugl 833c367
add tf-layoutlmv3 to documentation tests
ChrisFugl a111290
Add token- and sequence classification models.
EtcEc 5f25a33
TFLayoutLMv3ForQuestionAnswering
lre 12896c5
add imports to model init file
ChrisFugl 97a9e58
add imports to transformers init file
ChrisFugl b770bab
add tf layoutlmv3 entries to auto model
ChrisFugl d289bd7
dummy tf objects for layoutlmv3
ChrisFugl c962fdc
output hidden states of last layer
ChrisFugl 620aa36
auto styling
ChrisFugl 1cd30e5
fix-copies
ChrisFugl 936ae4d
typo of layoutlmv3 (was wrongly typed as layoutlm3)
ChrisFugl e12ec2e
Fix typo: "V3" --> "v3"
ChrisFugl 05291b7
Add skeleton for tests
ChrisFugl c32aca9
Add support for both int32 and int64 inputs
ChrisFugl cf418ac
Add huggingface profile links
ChrisFugl 37b9bd2
Test output shapes of various model types.
ChrisFugl 2c85e12
Add integration test
ChrisFugl 9a41cb3
make style
ChrisFugl b60107e
make quality
ChrisFugl 4bcb2b5
Check init consistency
ChrisFugl 62c63b5
Remove debug print statements.
ChrisFugl 68ff217
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 84afb39
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 087ed90
Remove shape_list dependency
ChrisFugl 137dc00
Explicit naming of shape comments
ChrisFugl 1c3f566
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 8ae53bc
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 9aa840c
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl c552df7
Use LARGE_NEGATIVE instead of tf.experimental
ChrisFugl c1b6c52
Remove superfluous else statements
ChrisFugl 997c140
Move get_int_dtype outside of the class
ChrisFugl c671622
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 7ea260f
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl a694cfa
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl d0e4e15
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl ebdbf0b
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl f41661c
Update tests/models/layoutlmv3/test_modeling_tf_layoutlmv3.py
ChrisFugl 2b05471
Add return types
ChrisFugl a57c317
one-hot + dense instead of embedding
ChrisFugl 9a53d24
custom test_loss_computation
ChrisFugl 3aab21b
Move get_int_dtype inline.
ChrisFugl 9d07f17
Make relative_position_matrix function as inline code.
ChrisFugl 239120e
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 1168538
Add extended docstring
ChrisFugl 36f623a
Use integer division
ChrisFugl 82e6254
Ignore position_ids from PyTorch model
ChrisFugl 02033d6
Implicit zeros initialization
ChrisFugl 83cadb0
embedding layers
ChrisFugl f842ae3
pretrained model superclass
ChrisFugl 268007c
self-attention layer
ChrisFugl 69a1c72
self-output layer
ChrisFugl 5d660c7
attention layer
ChrisFugl 28af6c9
intermediate layer
ChrisFugl 47f4d16
output layer
ChrisFugl 5725a5f
"encoder layer" layer
ChrisFugl 4e51eb0
add encoder
ChrisFugl 1bc193e
add main layer
ChrisFugl a52eeb1
add model
ChrisFugl f317bb7
Add token- and sequence classification models.
EtcEc 1bce29e
TFLayoutLMv3ForQuestionAnswering
lre 08344bd
add imports to model init file
ChrisFugl df801b1
add tf layoutlmv3 entries to auto model
ChrisFugl 1cea016
dummy tf objects for layoutlmv3
ChrisFugl 92ca018
output hidden states of last layer
ChrisFugl 31abb7c
auto styling
ChrisFugl 591ee5b
fix-copies
ChrisFugl 90d439c
typo of layoutlmv3 (was wrongly typed as layoutlm3)
ChrisFugl f243b2d
Fix typo: "V3" --> "v3"
ChrisFugl 62d0c20
Add skeleton for tests
ChrisFugl 604a351
Add support for both int32 and int64 inputs
ChrisFugl 8a65256
Test output shapes of various model types.
ChrisFugl 74a78ec
Add integration test
ChrisFugl c3af32c
make style
ChrisFugl a9f8a19
make quality
ChrisFugl 834838f
Check init consistency
ChrisFugl c2be8f4
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 97644ff
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl b52783d
Remove shape_list dependency
ChrisFugl 8963114
Explicit naming of shape comments
ChrisFugl 7a718dc
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 03f6cd7
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl bf42ec1
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 45ef827
Use LARGE_NEGATIVE instead of tf.experimental
ChrisFugl a445684
Remove superfluous else statements
ChrisFugl f47be23
Move get_int_dtype outside of the class
ChrisFugl ac195d0
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl d90c194
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 040d842
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 1655bb3
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 1153f05
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 7c2bfa5
Update tests/models/layoutlmv3/test_modeling_tf_layoutlmv3.py
ChrisFugl dceb341
Add return types
ChrisFugl fff0e9f
one-hot + dense instead of embedding
ChrisFugl ff3ec9b
custom test_loss_computation
ChrisFugl 963ace9
Move get_int_dtype inline.
ChrisFugl 1c17b1b
Make relative_position_matrix function as inline code.
ChrisFugl e96369d
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl 9d7e2e9
Add extended docstring
ChrisFugl 8a82be8
Use integer division
ChrisFugl 05467db
Ignore position_ids from PyTorch model
ChrisFugl d6724dd
dummy tf objects for layoutlmv3
ChrisFugl f648a49
fix-copies
ChrisFugl baa75df
Update src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py
ChrisFugl da7953a
Add pixel_values type hint
ChrisFugl 69a8b79
Remove whitespace
ChrisFugl fe145b6
Remove duplicate dummy objects
ChrisFugl 4ac174a
Merge branch 'add_tf_layoutlmv3' of github.com:ChrisFugl/transformers…
ChrisFugl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.