Week 1 Exercise 4 Model
I got the following error message. All my previous exercises have passed the test. I am not sure why this last one is not working. The expected Loss is 27, but mine is way lower. At the beginning of the iteration, the print out X and Y are as below.
single_example = turiasaurus
single_example_chars [‘t’, ‘u’, ‘r’, ‘i’, ‘a’, ‘s’, ‘a’, ‘u’, ‘r’, ‘u’, ‘s’]
single_example_ix [20, 21, 18, 9, 1, 19, 1, 21, 18, 21, 19]
X = [None, 20, 21, 18, 9, 1, 19, 1, 21, 18, 21, 19]
Y = [20, 21, 18, 9, 1, 19, 1, 21, 18, 21, 19, 0]
Iteration: 22000, Loss: 0.294620
Iavesaqr
Esitoriasaurus
Esitoriasaurus
Iaeaurus
Urus
Andoravenator
Saurur
AssertionError Traceback (most recent call last)
in
1 parameters, last_name = model(data.split(“\n”), ix_to_char, char_to_ix, 22001, verbose = True)
2
----> 3 assert last_name == ‘Trodonosaurus\n’, “Wrong expected output”
4 print(“\033[92mAll tests passed!”)
AssertionError: Wrong expected output