I keep getting the same UnboundLocalError: local variable referenced before assignment, I did check my code and this is not the case. I don’t know what to do. I can share the error message I got if it’s okay. I’d really appreciate any help.
Sure, it is fine to show the error trace you are getting. If the error is happening, there must be a reason. One thing to look for is to make sure you spelled the names of the activation functions correctly. Also note that you pass them as strings (in quotes), not as object references.
Thank you so much. I wasn’t aware that i should pass them as strings and this solved my error, again thank you so much
Note that is the way it worked in the “Step by Step” assignment as well. You’re just calling the same functions you were working with in the earlier exercise (but note that you don’t have to manually copy them over: they import the copies for you).
1 Like