"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "af68b03bbc3713b2cafc19ccc0c4830a2a339d1b"
Commit 26bf7ce9 authored by Daniël de Kok's avatar Daniël de Kok Committed by calberti
Browse files

SyntaxNet does not compile, because isnan is unknown. (#1229)

SyntaxNet does not compile with gcc version 5.4.0 20160609 (Ubuntu
5.4.0-6ubuntu1~16.04.4). This leads to the error in #1194.

Including cmath and using the std namespace for isnan solves this
problem.
parent f6e23e56
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_BEAM_H_ #define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_BEAM_H_
#include <algorithm> #include <algorithm>
#include <cmath>
#include <memory> #include <memory>
#include <vector> #include <vector>
...@@ -112,7 +113,7 @@ class Beam { ...@@ -112,7 +113,7 @@ class Beam {
CHECK_LT(matrix_idx, matrix_length) CHECK_LT(matrix_idx, matrix_length)
<< "Matrix index out of bounds!"; << "Matrix index out of bounds!";
const double score_delta = transition_matrix[matrix_idx]; const double score_delta = transition_matrix[matrix_idx];
CHECK(!isnan(score_delta)); CHECK(!std::isnan(score_delta));
candidate.source_idx = beam_idx; candidate.source_idx = beam_idx;
candidate.action = action_idx; candidate.action = action_idx;
candidate.resulting_score = state->GetScore() + score_delta; candidate.resulting_score = state->GetScore() + score_delta;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment