C4W1-exercise5

I got error as shown below. Any hint / advice?

1 Like

Hi @pongyuenlam

The error indicates that the output of english_vectorizer(text) does not have to_tensor. Make sure the output of english_vectorizer(text) is correct by printing the type of it.

Feel free to ask if you need further assistance :raised_hands:

1 Like

Thanks. I can get through it now, and the new error is as shown below. You hint / advice please.

1 Like

Check the dimensions of x that is passed to rnn after passing through the Embedding Layer. Also, make sure your the dimensions of your embedding space are correct!

1 Like

is this issue resolved @pongyuenlam

if yes, then kindly let us know where was the mistake, so future learners can get help from your post.

Regards
DP

Not yet. I have shared the codes with @Alireza_Saei earlier, and he has not replied me yet. I will send my codes and error messages to you via direct messages.

2 Likes

Hi @pongyuenlam

Error in your codes for GRADED FUNCTION: translate

  1. From code line
    Convert the original string into a tensor to First token should be SOS token with shape (1,1) refer the below image to make the corrections

  1. Next, for code line Iterate for max_length iterations, I suppose you change the codes which were already given by course creator which is :point_down:
    for token in range(max_length):
    BUT YOU HAVE CHANGED IT TO for i in range(max_length):, so kindly make that correction.
    In the same code line, mention temperature=0.0

  2. Next for code line: If done then break out of the loop YOUR CODE IS INCORRECT
    use the below image to make the correction

Remember all these pointer were grabbed from the same assignment, the image I shared are from the previous two cells before the grade cell translate, so try going through the non_grade cell also in details which gives many hints for these grade cell, for future self-debugging!!!

Let me know if you have any new error.

Keep Learning!!!

Regards
DP

I do not have any new error anymore. The above is a great suggestion so that I can think of the solution.

1 Like