I cannot find the right format about
kersa, would anybody give me some help?
I believe you’re expected to use the Sequential keras model in this exercise - so you add the layers as a comma-separated list within the square brackets.
There actually is an “add()” method for a Sequential API model. They mention it in the instructions, but don’t actually show any examples of how to use it. You don’t say what the indication of error actually is in this case. Your code looks correct to me, except for the “relu” layer. My suggestion would be to try adding “ReLU()” instead of the way you are currently doing it. Let us know if that helps or not. If it still fails, please show us the actual exception trace that you are getting.
Also please note that we don’t want to leave the source code published on the forums, so please edit your original post to remove the source once we figure this out. Thanks!
Thanks Paul, I wondered about that “add” method also.
thanks a lot!
@Homeros
This message is a duplicate. That’s not necessary. I replied on your other thread.
Also, please don’t post your code on the Forums. That’s not allowed by the course Honor Code.
And, if you sent me a direct message, please only do that if I request it.
I am so sorry both of my mistakes. I will learn details of Honor Code and I will delete my messages. Thanks for your help !
@ahmedsouari: That means there is something wrong with the previous line of code. Either there is something incomplete about the previous line (a missing close parenthesis) or you are in the middle of defining a sequential object (in that case then you need commas separating the elements). If you are in the section with the Functional API, then that is a different situation.