Is there any predefined function in OpenNMT for gradient checking?
I’ve developed a new encoder inside OpenNMT and want to be sure that it works well. If there is no gradient check function in the tool how can I write one?
I tried to write it by getting all parameters from my decoder and the loss value from the decoder, but I couldn’t, because if I’m not wrong, there is some randomness in decoder that produces different output and hence very different loss value each time. I appreciate your help.