ms_pointer_network
ms_pointer_network copied to clipboard
loss is nan
When training, the loss is nan,can you fix this problem? Corpus can find in https://drive.google.com/drive/folders/1DuIszwD-2jDZwDuJ6Jjgf5k0a1jiXtcC?usp=sharing
I have soloved the problem. It's due to the function log().
model.py
log_gate_score_1 = (gate_score+ 1e-45).log() # shape: (batch_size,) log_gate_score_2 = (1 - gate_score+ 1e-45).log() # shape: (batch_size,)