C1W1 Training, compile_and_train(translator) fails in Epoch 1. All prior unit tests passed

I don’t know this assignment, but the point is that you may not have written the training cell, but it uses the earlier code you wrote, right? It’s training the model that you defined. So that says there is something wrong with how you wrote it having to do with a scalar tensor which it looks like you created with tf.cast. Just guessing from the error message, but you are passing it to a TF API that doesn’t accept such an input because it’s not a Keras “Layer”. Here’s a thread which gives a nice explanation of the Keras Sequential and Functional APIs.

The reason that grader fails altogether is that it can’t even compile your code because of the later parts which are incomplete. There is something there that is a python syntax error, so it can’t get as far as running any of your earlier functions.

Sorry that I can give only “generic” as opposed to assignment specific guidance, but I’m not sure what timezone Arvydas is in, so thought it was worth a try …