Skip to content

Commit

Permalink
Fix tokenizer test and make model tests smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsRogge committed Aug 5, 2021
1 parent 3412065 commit 3fa1768
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/transformers/models/layoutlmv2/tokenization_layoutlmv2.py
Expand Up @@ -193,7 +193,12 @@ def __init__(
pad_token=pad_token,
cls_token=cls_token,
mask_token=mask_token,
cls_token_box=cls_token_box,
sep_token_box=sep_token_box,
pad_token_box=pad_token_box,
pad_token_label=pad_token_label,
tokenize_chinese_chars=tokenize_chinese_chars,
strip_accents=strip_accents,
model_max_length=model_max_length,
additional_special_tokens=additional_special_tokens,
**kwargs,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_modeling_layoutlmv2.py
Expand Up @@ -44,17 +44,17 @@ class LayoutLMv2ModelTester:
def __init__(
self,
parent,
batch_size=13,
batch_size=2,
num_channels=3,
image_size=32,
image_size=4,
seq_length=7,
is_training=True,
use_input_mask=True,
use_token_type_ids=True,
use_labels=True,
vocab_size=99,
hidden_size=36,
num_hidden_layers=5,
num_hidden_layers=3,
num_attention_heads=4,
intermediate_size=37,
hidden_act="gelu",
Expand Down

0 comments on commit 3fa1768

Please sign in to comment.