Open Alwaysadil opened 1 year ago
@Alwaysadil - please share a Colab notebook where you have reproduced this issue. Also, the notebook I shared used beam search and was working fine: https://colab.research.google.com/drive/1jtIRbIt0xqN-yqlfNUwlKAeavg4OO0WT?usp=sharing.
@abheesht17 sir, check this colab link https://colab.research.google.com/drive/13bSJlkDouDWdx8hN8B4W8PcZ0gWnL7Rn#scrollTo=dMeMMd1BK6TE
@abheesht17 Sir, please give me one reply about this issue
@abheesht17 Sir,without (@tf.function(input_signature=[tf.TensorSpec(shape=[1,40], dtype=tf.float32)])) signature getting output of beam search ,but with signature getting this nested structures mismatch error please tell me how to resolve this issue please ... https://colab.research.google.com/drive/13bSJlkDouDWdx8hN8B4W8PcZ0gWnL7Rn#scrollTo=dMeMMd1BK6TE
Hey, @Alwaysadil! Sorry for not seeing your message earlier, I'm a bit preoccupied with work. But will go through your issue ASAP.
Hi @Alwaysadil , it looks like the error message indicates that the retval_ variable returned by the main and else branches of the beam_search function have different nested structures. Specifically, the first structure is a tensor of shape (1, 40) and the second structure is a tuple of two tensors of shapes (40,) and (1, 2, 40) respectively. The beam_search function expects the same nested structure in both the main and else branches.
I think modifying the modified the token_probability_fn
function to return a tuple of two tensors should solve the issue.
Let me know if it does not!
@atharvapurdue getting errors when modifying the token_probability_fnc to return a tuple of two tensors as the function's output type."
@abheesht17 Sir,I understood you're busy with work, so take your time going through my issue. Thank you for your response sir,waiting for ur reply @abheesht17 sir....
@atharvapurdue getting errors when modifying the token_probability_fnc to return a tuple of two tensors as the function's output type."
Hi @Alwaysadil . Could you share the colab file please? I will take a look. Thanks!
Tq @atharvapurdue for your response ,please check this colab link https://colab.research.google.com/drive/13bSJlkDouDWdx8hN8B4W8PcZ0gWnL7Rn#scrollTo=dMeMMd1BK6TE
@abheesht17 Sir, did you go through my issue? Please give me a reply sir, please......
Describe the bug
To Reproduce
Expected behavior
Additional context
Would you like to help us fix it?