View on GitHub

END2

Course work related to END2 Program by The School of AI

Assignment


This code (Links to an external site.)is from the same repo that we were following. Your assignment is to remove all the legacy stuff from this and submit:

1) Last 5 Training EPOCH logs

2) Sample translation for 10 example

3) Link to your repo

Solution


Link to GitHub Code

Link to Colab Code

1) Training Logs

Epoch: 1, Train loss: 4.030, Train PPL:  56.288 | Val loss: 3.069, Val. PPL:  21.520 | Epoch time = 27.051s
Epoch: 2, Train loss: 2.668, Train PPL:  14.404 | Val loss: 2.444, Val. PPL:  11.518 | Epoch time = 26.960s
Epoch: 3, Train loss: 2.090, Train PPL:   8.088 | Val loss: 2.184, Val. PPL:   8.885 | Epoch time = 26.827s
Epoch: 4, Train loss: 1.721, Train PPL:   5.590 | Val loss: 2.073, Val. PPL:   7.945 | Epoch time = 27.087s
Epoch: 5, Train loss: 1.448, Train PPL:   4.255 | Val loss: 2.052, Val. PPL:   7.786 | Epoch time = 27.070s
Epoch: 6, Train loss: 1.234, Train PPL:   3.436 | Val loss: 2.027, Val. PPL:   7.592 | Epoch time = 27.012s
Epoch: 7, Train loss: 1.057, Train PPL:   2.879 | Val loss: 2.064, Val. PPL:   7.874 | Epoch time = 27.237s
Epoch: 8, Train loss: 0.912, Train PPL:   2.489 | Val loss: 2.109, Val. PPL:   8.243 | Epoch time = 26.991s
Epoch: 9, Train loss: 0.797, Train PPL:   2.218 | Val loss: 2.150, Val. PPL:   8.582 | Epoch time = 27.050s
Epoch: 10, Train loss: 0.706, Train PPL:   2.026 | Val loss: 2.205, Val. PPL:   9.070 | Epoch time = 26.841s

2) Sample Translations from French to English.

****************************************
French to English Translations:-
****************************************


1) French Sentence: Ein Mann mit einem orangefarbenen Hut, der etwas anstarrt.

Target English Sentence: A man in an orange hat starring at something.

Predicted English Sentence: A man in an orange hat , with a handheld mane brush .


2) French Sentence: Ein Boston Terrier läuft über saftig-grünes Gras vor einem weißen Zaun.

Target English Sentence: A Boston Terrier is running on lush green grass in front of a white fence.

Predicted English Sentence: A Boston Boston jockey walks over grass in front of a white fence .


3) French Sentence: Ein Mädchen in einem Karateanzug bricht einen Stock mit einem Tritt.

Target English Sentence: A girl in karate uniform breaking a stick with a front kick.

Predicted English Sentence: A girl in a karate uniform is learning a stick with a zebra mate , and roll .


4) French Sentence: Fünf Leute in Winterjacken und mit Helmen stehen im Schnee mit Schneemobilen im Hintergrund.

Target English Sentence: Five people wearing winter jackets and helmets stand in the snow, with snowmobiles in the background.

Predicted English Sentence: Five people in winter jackets and helmets stand in the snow with bamboo poles in the background .


5) French Sentence: Leute Reparieren das Dach eines Hauses.

Target English Sentence: People are fixing the roof of a house.

Predicted English Sentence: People trail out the roof of a house .


6) French Sentence: Ein hell gekleideter Mann fotografiert eine Gruppe von Männern in dunklen Anzügen und mit Hüten, die um eine Frau in einem trägerlosen Kleid herum stehen.

Target English Sentence: A man in light colored clothing photographs a group of men wearing dark suits and hats standing around a woman dressed in a strapless gown.

Predicted English Sentence: A man in bright suits take a picture of men in a dark suits and hats stand around a woman in a zebra dress .


7) French Sentence: Eine Gruppe von Menschen steht vor einem Iglu.

Target English Sentence: A group of people standing in front of an igloo.

Predicted English Sentence: A group of people are in front of an igloo .


8) French Sentence: Ein Junge in einem roten Trikot versucht, die Home Base zu erreichen, während der Catcher im blauen Trikot versucht, ihn zu fangen.

Target English Sentence: A boy in a red uniform is attempting to avoid getting out at home plate, while the catcher in the blue uniform is attempting to catch him.

Predicted English Sentence: A boy in a red uniform tries to home plate while the catcher in a blue uniform tries to get the call .


9) French Sentence: Ein Typ arbeitet an einem Gebäude.

Target English Sentence: A guy works on a building.

Predicted English Sentence: A guy working on a building while riding .


10) French Sentence: Ein Mann in einer Weste sitzt auf einem Stuhl und hält Magazine.

Target English Sentence: A man in a vest is sitting in a chair and holding magazines.

Predicted English Sentence: A man in a vest sits on a stool and holds up magazines .

French to English Translation with Attention Maps


French to English Translations:- **************

1) French Sentence: Ein Mann mit einem orangefarbenen Hut, der etwas anstarrt.

Target English Sentence: A man in an orange hat starring at something.

Predicted English Sentence: A man in an orange hat , with a handheld mane brush . Attention Map:

2) French Sentence: Ein Boston Terrier läuft über saftig-grünes Gras vor einem weißen Zaun.

Target English Sentence: A Boston Terrier is running on lush green grass in front of a white fence.

Predicted English Sentence: A Boston Boston jockey walks over grass in front of a white fence . Attention Map:

3) French Sentence: Ein Mädchen in einem Karateanzug bricht einen Stock mit einem Tritt.

Target English Sentence: A girl in karate uniform breaking a stick with a front kick.

Predicted English Sentence: A girl in a karate uniform is learning a stick with a zebra mate , and roll . Attention Map:

4) French Sentence: Fünf Leute in Winterjacken und mit Helmen stehen im Schnee mit Schneemobilen im Hintergrund.

Target English Sentence: Five people wearing winter jackets and helmets stand in the snow, with snowmobiles in the background.

Predicted English Sentence: Five people in winter jackets and helmets stand in the snow with bamboo poles in the background . Attention Map:

5) French Sentence: Leute Reparieren das Dach eines Hauses.

Target English Sentence: People are fixing the roof of a house.

Predicted English Sentence: People trail out the roof of a house . Attention Map: