hi ,
I am getting below error please help me to resolve
@Deepti_Prasad
Thank you
suman vemula
make sure in the next word prediction, the sequence is question, answer and model(remember these are recalled by assigned call arguments in the grade cell translate and not by global variables.
Regards
DP
how did you recall your codes in decoder cell for call statement, I hope you used self.decoder!!!
the test result clearly mentions you are using global variables instead of local (call arguments) variables for decoder.
yes in the translator Class
i called logits = self.decoder (encoded_context,target)
please DM screenshot of translator and decoder grade cells
in the iteration for max length
to generate next token, you have used decoder instead of using model.decoder
Also please avoid giving extra spaces while you write codes as sometime this can give you syntax error/indentation error
There are multiple places were codes are written with extra spaces in decoder as well as translator grade cell, so avoid doing this.
please share the complete error image
Vemula,
For Initial hidden and cell states should be tensors of zeros with shape (1, UNITS)
Kindly use tf.zeros and not tf.random as the above instructions clearly mentions cell states and initial hidden states should be tensor of zeros