Hi, I’m having problems with Exercise 3, which is looks like this:
TypeError: Keras symbolic inputs/outputs do not implement `_len_`. You may be trying to pass Keras symbolic inputs/outputs to a TF API that does not register dispatching, preventing Keras from automatically converting the API call to a lambda layer in the Functional Model. This error will also get raised if you try asserting a symbolic input/output directly.
I cannot find any internal post on the course forums, and I could only find this online:
Which seems to indicate that the version of Keras needs updating. The rest of the problems highlighted by the very comprehensive answer offered on stackoverflow to that post seem to be irrelevant to this exercise.
Hope I have offered enough information for this. I think that I mostly did the exercise correctly, but if not, please help, as well.
Thank you!
I have not seen this error before. Could you provide us the full exception trace that accompanies this error? I want to follow it all the way back to the root line of code.
Just to check, you are running this on Coursera, right? If you run things locally and don’t take the trouble to duplicate the circa 2021 versions of all the packages, then all bets are off and “versionitis” is the word of the day.
1 Like
Hi @paulinpaloalto. Yes, sorry, I was running it on Coursera, however, I traced it back myself, and realised that I got an error in the call of my Conv10 function, as I was trying to use ublock9 inside the parameters. I don’t even know what I was thinking, really. Must have just gotten used to defining the ublocks, and did not realise that it was just the output convolutional block, at the same level with conv9.
In any case, I will undo all of my changes and paste a screenshot below, just for reference (in 2 parts).
TL;DR: I got rid of the error by changing the conv function call parameters to the appropriate ones, as mentioned in the comment above the conv10 function call.
2 Likes
That’s great news that you found the solution under your own power! Onward! 
2 Likes
Thank you very much for the help and all the support, @paulinpaloalto ! I’ve read through a lot of your solutions for debugging the code within this course, the support for this course is amazing! (I can’t even understand how you are doing it and are so active, really - I’ve been a f2f PGTA myself, and I’d imagine it’s even harder for such a large community, heh)
1 Like
Back when I was a grad student (a very long time ago
), I taught some undergrad math courses and had a lot of experience as a F2F TA. Online is a different thing, but the same skills and principles apply. The other thing to say is that DLS has been in operation since 2017 and these Discourse forums have been active since 2021 (if memory serves), so there is quite a lot of history here. The activity you see when you do a search has occurred over a 4+ year period. DLS has the most history here and there are a number of mentors who have years of experience with supporting it, so you should get good responses with any questions or issues.
1 Like
I learn a lot from Paul, too!
