yandex / faster-rnnlm

Faster Recurrent Neural Network Language Modeling Toolkit with Noise Contrastive Estimation and Hierarchical Softmax
Other
562 stars 138 forks source link

Use std:: versions of isinf and isnan #41

Closed ghost closed 7 years ago

ghost commented 7 years ago

For whatever reason, accessing the C versions of these functions doesn't work under GCC-5.4 on Ubuntu 16.04. This works for me and should be more portable, but YMMV if this is important.

akhti commented 7 years ago

Hi!

I've just compiled the program with the following compiler: $ g++-5 --version g++-5 (Ubuntu 5.4.1-2ubuntu1~14.04) 5.4.1 20160904 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Could you please:

  1. Show your --version.
  2. Try to use global namespace instead of std, i.e. replace std::isinf with ::inf. And remove cmath. Does this work for you?