Everythig seems to work “all tests passed” but get the following error when I submit for a grade:
Cell #UNQ_C4. Can’t compile the student’s code. Error: NameError(“name ‘activa’ is not defined”)
I can’t find name ‘activa’ anywhere in my code
Everythig seems to work “all tests passed” but get the following error when I submit for a grade:
Cell #UNQ_C4. Can’t compile the student’s code. Error: NameError(“name ‘activa’ is not defined”)
I can’t find name ‘activa’ anywhere in my code
Hi @Joshua_Neft
In the cell UNQ_C4
Make sure that you use parameter activation = ‘…’ in the dense function like this command tf.keras.layers.Dense(…, activation=“…”), and abbreviations for the word activation
Cheers,
Abdelrahman
@Joshua_Neft
you code is right but there are an importing cell didn’t found in your assignment
# UNQ_C4
# GRADED CELL: model_s
tf.random.set_seed(1234)
model_s = Sequential(
[
### START CODE HERE ###
### END CODE HERE ###
], name = "Simple"
)
model_s.compile(
### START CODE HERE ###
loss=None,
optimizer=None,
### START CODE HERE ###
)
import logging
logging.getLogger("tensorflow").setLevel(logging.ERROR)
# BEGIN UNIT TEST
model_s.fit(
X_train,y_train,
epochs=1000
)
# END UNIT TEST
# BEGIN UNIT TEST
model_s.summary()
model_s_test(model_s, classes, X_train.shape[1])
# END UNIT TEST
Cheers,
Abdelrahman
“There is an importing cell I didn’t find”
Can you elaborate, please.
Thank you for your help.
your assignment code isn’t complete may you delete cell without noticing, or you merged several cells together and forgot to take a code, or there is a problem with Coursera… you cell implementation must be like that only
import logging
logging.getLogger("tensorflow").setLevel(logging.ERROR)
like this image
Uploading: image.png…
so you want to correct the cells like that first remove the cell of your problem and copy these cell instead of it and implement it again .
this in the separate cell
# UNQ_C4
# GRADED CELL: model_s
tf.random.set_seed(1234)
model_s = Sequential(
[
### START CODE HERE ###
### END CODE HERE ###
], name = "Simple"
)
model_s.compile(
### START CODE HERE ###
loss=None,
optimizer=None,
### START CODE HERE ###
)
this is in the next cell
import logging
logging.getLogger("tensorflow").setLevel(logging.ERROR)
# BEGIN UNIT TEST
model_s.fit(
X_train,y_train,
epochs=1000
)
# END UNIT TEST
this is in the next cell
# BEGIN UNIT TEST
model_s.summary()
model_s_test(model_s, classes, X_train.shape[1])
# END UNIT TEST
@Joshua_Neft
you can get fresh assignment by doing these steps file → open → select running assignment and doing shutdown and select all file and delete it → after that select help
like this image and choose →

Cheers!
Abdelrahman
Hello
I can’t open the lab. I confront this error:‘Your lab session has timed out’
I asked coursera’s support center but they have not answered me yet.
do you what must I do?
First thing:
Check whether your computer’s clock and time zone are set correctly.