Views
No views yet
| Split | Samples |
|---|---|
| Train | 29,000 |
| Validation | 1,014 |
| Test | 1,000 |
| Metric | Value |
|---|---|
| Train Loss | 0.87 |
| Validation Loss | 5.19 |
| Test Loss | 3.75 |
| BLEU | 16.06 |

1# Load model
2model = Seq2Seq(encoder, decoder, device)
3
4model.load_state_dict(
5 load_file("best_seq2seq_gru.safetensors")
6)
7
8model.eval()
9
10# Inference
11sentence = "A man is riding a bicycle."
12
13translation = translate_sentence(
14 sentence,
15 model
16)
17
18print(" ".join(translation))