All tests passed. But, grader fails modelf

Greetings!!
I am trying to complete the Neural Machine Translation programming assignment that is a part of the DLS C5 (sequence models), W3.
I see that my code is passing all the tests. But, Exercise 2 - modelf, is getting failed by the grader with the following message:

Code Cell UNQ_C1: Function 'one_step_attention' is correct.
Code Cell UNQ_C2: Unexpected error (ValueError('Input 0 of layer dense is incompatible with the layer: expected axis -1 of input shape to have value 128 but received input with shape [None, 30, 320]')) occurred during function check. We expected function `modelf` to return type <class 'bool'>. Please check that this function is defined properly. 
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.

Two other things I noticed:

  1. Model summary is different as you can see from below:
Model: "functional_22"
__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to                     
==================================================================================================
input_10 (InputLayer)           [(None, 30, 37)]     0                                            
__________________________________________________________________________________________________
s0 (InputLayer)                 [(None, 64)]         0                                            
__________________________________________________________________________________________________
bidirectional_9 (Bidirectional) (None, 30, 64)       17920       input_10[0][0]                   
__________________________________________________________________________________________________
repeat_vector (RepeatVector)    (None, 30, 64)       0           s0[0][0]                         
                                                                 lstm[110][1]                     
                                                                 lstm[111][1]                     
                                                                 lstm[112][1]                     
                                                                 lstm[113][1]                     
                                                                 lstm[114][1]                     
                                                                 lstm[115][1]                     
                                                                 lstm[116][1]                     
                                                                 lstm[117][1]                     
                                                                 lstm[118][1]                     
__________________________________________________________________________________________________
concatenate (Concatenate)       (None, 30, 128)      0           bidirectional_9[0][0]            
                                                                 repeat_vector[110][0]            
                                                                 bidirectional_9[0][0]            
                                                                 repeat_vector[111][0]            
                                                                 bidirectional_9[0][0]            
                                                                 repeat_vector[112][0]            
                                                                 bidirectional_9[0][0]            
                                                                 repeat_vector[113][0]            
                                                                 bidirectional_9[0][0]            
                                                                 repeat_vector[114][0]            
                                                                 bidirectional_9[0][0]            
                                                                 repeat_vector[115][0]            
                                                                 bidirectional_9[0][0]            
                                                                 repeat_vector[116][0]            
                                                                 bidirectional_9[0][0]            
                                                                 repeat_vector[117][0]            
                                                                 bidirectional_9[0][0]            
                                                                 repeat_vector[118][0]            
                                                                 bidirectional_9[0][0]            
                                                                 repeat_vector[119][0]            
__________________________________________________________________________________________________
dense (Dense)                   (None, 30, 10)       1290        concatenate[110][0]              
                                                                 concatenate[111][0]              
                                                                 concatenate[112][0]              
                                                                 concatenate[113][0]              
                                                                 concatenate[114][0]              
                                                                 concatenate[115][0]              
                                                                 concatenate[116][0]              
                                                                 concatenate[117][0]              
                                                                 concatenate[118][0]              
                                                                 concatenate[119][0]              
__________________________________________________________________________________________________
dense_1 (Dense)                 (None, 30, 1)        11          dense[110][0]                    
                                                                 dense[111][0]                    
                                                                 dense[112][0]                    
                                                                 dense[113][0]                    
                                                                 dense[114][0]                    
                                                                 dense[115][0]                    
                                                                 dense[116][0]                    
                                                                 dense[117][0]                    
                                                                 dense[118][0]                    
                                                                 dense[119][0]                    
__________________________________________________________________________________________________
attention_weights (Activation)  (None, 30, 1)        0           dense_1[110][0]                  
                                                                 dense_1[111][0]                  
                                                                 dense_1[112][0]                  
                                                                 dense_1[113][0]                  
                                                                 dense_1[114][0]                  
                                                                 dense_1[115][0]                  
                                                                 dense_1[116][0]                  
                                                                 dense_1[117][0]                  
                                                                 dense_1[118][0]                  
                                                                 dense_1[119][0]                  
__________________________________________________________________________________________________
dot (Dot)                       (None, 1, 64)        0           attention_weights[110][0]        
                                                                 bidirectional_9[0][0]            
                                                                 attention_weights[111][0]        
                                                                 bidirectional_9[0][0]            
                                                                 attention_weights[112][0]        
                                                                 bidirectional_9[0][0]            
                                                                 attention_weights[113][0]        
                                                                 bidirectional_9[0][0]            
                                                                 attention_weights[114][0]        
                                                                 bidirectional_9[0][0]            
                                                                 attention_weights[115][0]        
                                                                 bidirectional_9[0][0]            
                                                                 attention_weights[116][0]        
                                                                 bidirectional_9[0][0]            
                                                                 attention_weights[117][0]        
                                                                 bidirectional_9[0][0]            
                                                                 attention_weights[118][0]        
                                                                 bidirectional_9[0][0]            
                                                                 attention_weights[119][0]        
                                                                 bidirectional_9[0][0]            
__________________________________________________________________________________________________
c0 (InputLayer)                 [(None, 64)]         0                                            
__________________________________________________________________________________________________
lstm (LSTM)                     [(None, 64), (None,  33024       dot[110][0]                      
                                                                 s0[0][0]                         
                                                                 c0[0][0]                         
                                                                 dot[111][0]                      
                                                                 lstm[110][1]                     
                                                                 lstm[110][2]                     
                                                                 dot[112][0]                      
                                                                 lstm[111][1]                     
                                                                 lstm[111][2]                     
                                                                 dot[113][0]                      
                                                                 lstm[112][1]                     
                                                                 lstm[112][2]                     
                                                                 dot[114][0]                      
                                                                 lstm[113][1]                     
                                                                 lstm[113][2]                     
                                                                 dot[115][0]                      
                                                                 lstm[114][1]                     
                                                                 lstm[114][2]                     
                                                                 dot[116][0]                      
                                                                 lstm[115][1]                     
                                                                 lstm[115][2]                     
                                                                 dot[117][0]                      
                                                                 lstm[116][1]                     
                                                                 lstm[116][2]                     
                                                                 dot[118][0]                      
                                                                 lstm[117][1]                     
                                                                 lstm[117][2]                     
                                                                 dot[119][0]                      
                                                                 lstm[118][1]                     
                                                                 lstm[118][2]                     
__________________________________________________________________________________________________
dense_2 (Dense)                 (None, 11)           715         lstm[110][1]                     
                                                                 lstm[111][1]                     
                                                                 lstm[112][1]                     
                                                                 lstm[113][1]                     
                                                                 lstm[114][1]                     
                                                                 lstm[115][1]                     
                                                                 lstm[116][1]                     
                                                                 lstm[117][1]                     
                                                                 lstm[118][1]                     
                                                                 lstm[119][1]                     
==================================================================================================
Total params: 52,960
Trainable params: 52,960
Non-trainable params: 0
_____________________________________________________________________________________

As you can see from the attached screenshot, the accuracy is somewhat low:

Also, it translated the following input entry:

source: 21th of August 2016
output: 2016-08-20 

I am unable to figure what the issues are. please help me resolve this.

Hi @David00,

Have you paid attention to this particular bit by the autograder ?

We expected function modelf to return type <class 'bool'>. Please check that this function is defined properly.

Best,
Mubsi

I made a copy of the notebook that got named as with the word ‘copy’ appended to it. All the tests passed in the copy. When I submitted the assignment, it seems like only the original notebook got submitted. (I suppose the name of the notebook is not passed to the grader.)

I have renamed the copy to the original file and submitted. The grader accepted it.
One intriguing thing - identification accuracy for certain indices is fairly low at 0.5. The model incorrectly identifies one of the date strings listed in my original post.

when I print the data type of the model, I get the following:

data type of model <class ‘tensorflow.python.keras.engine.functional.Functional’>

Hi @David00,

Yes, the autograder looks for a file with the predefined “default name”, and only that files gets forwarded to it. If you change the name of the file, it won’t submit.

As for the rest, let me DM you.

Best,
Mubsi