Skip to content
Snippets Groups Projects
Unverified Commit b080ea98 authored by Mélodie Boillet's avatar Mélodie Boillet Committed by Yoann Schneider
Browse files

Add tests for prediction code

parent 15e907b5
No related branches found
No related tags found
No related merge requests found
Showing
with 33 additions and 28 deletions
......@@ -48,7 +48,7 @@ def training_config():
return {
"dataset_params": {
"datasets": {
"training": "./tests/data/training_page",
"training": "./tests/data/training/training_dataset",
},
"train": {
"name": "training-train",
......@@ -165,3 +165,8 @@ def training_config():
},
},
}
@pytest.fixture
def prediction_data_path():
return FIXTURES / "prediction"
nb_chars: 49
cer: 1.1429
nb_words: 9
wer: 1.0
nb_words_no_punct: 9
wer_no_punct: 1.0
sample_time: 0.8385
time: 1.6771
nb_samples: 2
nb_chars: 43
cer: 1.2791
nb_words: 9
wer: 1.0
nb_words_no_punct: 9
wer_no_punct: 1.0
sample_time: 0.8334
time: 1.6668
nb_samples: 2
nb_chars: 41
cer: 1.2683
nb_words: 9
wer: 1.0
nb_words_no_punct: 9
wer_no_punct: 1.0
sample_time: 0.8314
time: 1.6628
nb_samples: 2
tests/data/prediction/images/0a56e8b3-95cd-4fa5-a17b-5b0ff9e6ea84.png

100 KiB

tests/data/prediction/images/0dfe8bcd-ed0b-453e-bf19-cc697012296e.png

106 KiB

tests/data/prediction/images/2c242f5c-e979-43c4-b6f2-a6d4815b651d.png

88.8 KiB

tests/data/prediction/images/ffdec445-7f14-4f5f-be44-68d0844d0df1.png

89.9 KiB

---
version: 0.0.1
parameters:
mean: [166.8418783515498, 166.8418783515498, 166.8418783515498]
std: [34.084189571536385, 34.084189571536385, 34.084189571536385]
max_char_prediction: 200
encoder:
input_channels: 3
dropout: 0.5
decoder:
enc_dim: 256
l_max: 15000
dec_pred_dropout: 0.1
attention_win: 100
use_1d_pe: True
use_lstm: False
vocab_size: 96
h_max: 500
w_max: 1000
dec_num_layers: 8
dec_dim_feedforward: 256
dec_num_heads: 4
dec_att_dropout: 0.1
dec_res_dropout: 0.1
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
File moved
File moved
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment