MWPToolkit icon indicating copy to clipboard operation
MWPToolkit copied to clipboard

I get ValueError: ('No loss to back propagate.') while training TRNN

Open Marzie00Abd opened this issue 2 years ago • 1 comments

hi I get the same error using different datasets. any advice?

Marzie00Abd avatar May 07 '22 04:05 Marzie00Abd

TRNN has two stages to generate. if the equation is [n0 + n1 - n2 ] first generate template, like [n0 <op> n1 <op> n2], <op> is unkown operator token. the label of this stage is [n0 <op> n1 <op> n2] while training. second generate operaters from [n0 <op> n1 <op> n2], so the label is [+ , -]

the error maybe occur in second stage i think. if equation is like [n0], without any operator. that means there is no forward propagate while second stage, then you won't get the loss. but it hanppens when the whole batch sample has no operator to predict.

i should consider fixing this bug,the model doesn‘t forward propagate in second stage then shouldn't back propagate and
second module shouldn't update parameters

LYH-YF avatar May 08 '22 09:05 LYH-YF