Natural Language Processing with Sequence Models C3W3

Hi Folks – I get the following error for every exercise for C3W3_Assignment in “NLP Specialization Siamese Networks”
“There was a problem compiling the code from your notebook. Details:\nname ‘model’ is not defined”
There is no use of a variable called “model” in the definition for siamese.
Here is a screenshot of the error:

Can anyone help me please? Thanks in advance!
Post grade cells codes, links to graded assignment is against community guidelines and against code of conduct.

Example usage:

Assuming you have a TextVectorization instance named text_vectorizer

corpus = [
“This is a sample sentence.”,
“Another example sentence.”,
“Yet another example of a sentence.”
]
text_vectorizer = tf.keras.layers.TextVectorization(max_tokens=36224, output_mode=‘int’)
text_vectorizer.adapt(corpus)

Create the Siamese model

siamese_model = Siamese(text_vectorizer)
siamese_model.summary()

You need to post screenshot of the error you have encountered rather than posting any codes which grade your assignment.

Also your query is in ai discussion, so kindly use the :writing_hand:t2: option next to your header of your topic, to move the query to right course and week mention.

Sorry about that – I am a newbie. Where is the writing hand icon on the screen?
Does that selection allow me to post the question in the machine learning category?
Thanks in advance,
Paul

It looks like you’re referring the variable named “model” before assigning any value to it.