Hi~ Thank you very much for sharing the code, it really helped me a lot \^_^!
However, I found a problem when I executed the program (gongdols/머신러닝/restricted_boltzmann_machine/denoising_RBM.py), as well as the similar code in main.py. Sometimes, the output of the program would be NAN. I figured out the reason
temp = torch.log(torch.exp(wx_b) + 1)
That is because when the input of torch.exp is 88, torch.exp(88) would output INF (Infinity), and further cause the program to output NAN. It might be better if we use torch.clamp to the program to avoid torch.exp(88)
Hi~ Thank you very much for sharing the code, it really helped me a lot \^_^!
However, I found a problem when I executed the program (
gongdols/머신러닝/restricted_boltzmann_machine/denoising_RBM.py
), as well as the similar code inmain.py
. Sometimes, the output of the program would be NAN. I figured out the reasonThat is because when the input of
torch.exp
is 88,torch.exp(88)
would output INF (Infinity), and further cause the program to output NAN. It might be better if we usetorch.clamp
to the program to avoidtorch.exp(88)
Looking forward to receiving your reply~
Thanks in advance!