MWPToolkit
MWPToolkit copied to clipboard
I get ValueError: ('No loss to back propagate.') while training TRNN
hi I get the same error using different datasets. any advice?
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