hexiangnan / attentional_factorization_machine

TensorFlow Implementation of Attentional Factorization Machine
407 stars 156 forks source link

AFM训练中出现nan #9

Open Atomu2014 opened 6 years ago

Atomu2014 commented 6 years ago

AFM训练起来很容易nan,请问您遇到过这种情况吗?对于调参数有什么建议?哪些参数比较敏感?

hexiangnan commented 6 years ago

nan应该是因为我们自己用exp函数实现了softmax, 导致容易overflow。换用tensorflow实现的softmax应该就不会nan了。

On Sat, Feb 10, 2018 at 11:48 PM, KevinKune notifications@github.com wrote:

AFM训练起来很容易nan,请问您遇到过这种情况吗?对于调参数有什么建议?哪些参数比较敏感?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hexiangnan/attentional_factorization_machine/issues/9, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGxjuXIl51KSyJ121ucnDpYetMQ64Wiks5tTboxgaJpZM4SA-Kv .

-- Best Regards, Xiangnan He

Atomu2014 commented 6 years ago

感谢回答,最近发现调节softmax的温度会比较容易训练,在我的数据集上调节温度比attention_lambda更有效,能显著控制过拟合,建议代码中增加调节温度的参数

hexiangnan commented 6 years ago

谢谢告知!

On Thu, Feb 15, 2018 at 2:50 PM, KevinKune notifications@github.com wrote:

感谢回答,最近发现调节softmax的温度会比较容易训练,在我的数据集上调节温度比attention_lambda更有效,能显著控制过拟合, 建议代码中增加调节温度的参数

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hexiangnan/attentional_factorization_machine/issues/9#issuecomment-365840062, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGxjgrFgN4ZzcHQz8khApezHDNIjFkmks5tU9PIgaJpZM4SA-Kv .

-- Best Regards, Xiangnan He