C3W3 assignment seq_pad_and_trunc failing test

Hey Ali!

Welcome to the Discourse!

If you could click on my name and send me the code you put in a DM, that would help me be more sure about what is happening. I have a hunch based on the error, but I’d love to be able to confirm it for you!

Thanks!

Is the issue solved sir?
Thanks

Hi, thank you for asking, the issue still remains fortunately Chris is currently looking into it.

Kind regards,

ALI

Hello Ali,

Sorry for the slow response!

I have looked into this issue - and it looks as though (in the cell where we define fit_tokenizer) you’re initializing your Tokenizer() like this:

Tokenizer(train_sentences, oov_token=oov_token)

What we want to do instead (as outlined by the comment: # Instantiate the Tokenizer class, passing in the correct values for num_words and oov_token

Is something along the lines of this:

Tokenizer(num_words=SOMETHING, oov_token=oov_token)

I’ll leave it up to you what you think that SOMETHING should be! If you need any further help, please don’t hesitate to reach out!

Again, sorry for the slow reply!

1 Like

Thank you very much Chris for your support, you pointed me in the right direction. seq_pad_and_trunc() is passing the test :clap: