Not implemented error in chapter 8

I’m trying to implement collaborative model with Cross Entropy as loss function as asked at the end of the chapter 8 in fastbook. I’m getting Not implemented error for the following model -

Kindly cross-check with the book for the implementation, if you have followed the steps as stated. It is difficult the debug without seeing the stack trace