TypeError in the "Handling Complex Images" assignment

For the “Handling Complex Images” assignment I keep getting a TypeError about set_model() missing an argument? but I can not find that line of code. The program also is saying it has an Error for my model.fit. I would like to show one of the moderators or admins my code so they can see what I’m talking about, if that’s ok. I greatly apricate any help I can get.

I think you should look at model.compile or model.fit the parameters that go into either of these, you are probably missing something there or its not set properly.

1 Like

Thank you so much! I will definitely try this.

I find the issue, it was with my callbacks in the model.fit() for anyone having the same issue, please look at your code in the code block where you define/create your model, There’s a thing that says “# Instantiate the callback” this is where the callback will no longer be refered to as “myCallback” thank you so much for the user named Hughkf for helping me with this, and to all the staff members who tried to help. You all are great!


In my code, I have a problem with mycalback, it is already defined, but when the model runs, everything is fine, but the task is delivered with an error:

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

[moderator edit: removed code]

From what i see they seem to be right, could you rerun entire code. Unless there are updates in the tf.keras.callbacks.Callback class, I am not sure where the problem could be.

Have a rerun on it and if not working send me you notebook on PM, if I can find any mistake. Otherwise there might be some updates involved.

1 Like

I see you assignment works fine in the online notebook, so the issue is with the grader.

I take it you have tried refreshing the workspace and getting the latest version of the Assignment and also the name of the notebook is the default?!

Hi Chris @chris.favila, I wonder if its possible for you to have a look on this error, I think there might be an issue with the grader, the code seems to be fine! Thank you.

I didn’t change any parameter, the name of the file is the same, if possible and you can pass me the clean notebook from the beginning of the activity, so I can redo it.

Hi Flayson! Welcome to the community! You can try refreshing your workspace (instructions here) and see if you still get the error. If it still doesn’t work, kindly send me a copy of your notebook via DM so we can troubleshoot. Thank you!

1 Like