NLP with Attention models: C4_W3 Exercise 3 :answer_question

Hello,
I have a question about the last exercise # GRADED FUNCTION: answer_question, of the last assignment of the last course of the NLP specialization: Attention with NLP models


this is the output i am getting which seems to be matching,
however when i send for marking I receive this error,

Any help will be appreciated, Thanks!

1 Like

Hi @Deniz_Hallacoglu_UK

Have you changed the cell from this?:

# Restore the weights
transformer.load_weights('./pretrained_models/model_qa3')

note the structure of the path.

1 Like


It turns out that i did not change the block but I am still getting the same error unfortunately

1 Like

transformer.load_weights(‘./pretrained_models/model_qa3’)

My understanding is, we essentially load this pre trained transformer weights as it is better trained on far more epochs.

but why do i get this error ?
NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for ./model_qa3?

1 Like

Your understanding is correct.

I’m not sure. This is probably related to a very recent update and probably the file was removed. I tried it today and I get the same error but I wasn’t getting it before. Essentially, the line 290 of the unit test tries to load model weights from file that is not there (maybe it was used to be here and in the pretrained_models directory too).

Maybe @Mubsi can clarify on this problem?

1 Like

Yes,I see.Also I have downloaded the workspace and checked.There seems to be files for model_qa3 in pretrained_models, where I would assume the weights are saved stationaryly.
But yeah a quick full response would be appreciated!

1 Like

Hi @Deniz_Hallacoglu_UK

You should be able to pass the Assignment despite the error for the unit test.

Let me know if you pass.

Cheers

1 Like

Hello everyone,

I also got the same issue : NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for ./model_qa3
And I tried to submit the assignment despite having this error but it does not pass the grading consequence, I cannot get my final certificate; I’m stuck at this level; please if anyone find a way out please share.

Best

1 Like

Hi,

This error is due to a missing file and impacts only the unit-tests. The grader does not rely on this file and is working fine, I just tested it and it grades all functions correctly.

Our team is working to fix the unittest issue.

2 Likes

Hi @Jan_Ravnik,

I am facing another Grader issue:

“There was a problem compiling the code from your notebook. Details:
name ‘tokenizer’ is not defined”

Please fix this. I had to pay an additional month’s subscription fees just to finish this assignment due to this error.

1 Like

Hi @Amit_Bhartia ,

sorry to hear that you are having issues.

If you haven’t solved it yet, would you mind sending me the notebook via DM and I can have a look and get back to you.

1 Like

Yes I did, thanks guys

1 Like