提交 892ca0bc authored 作者: James Bergstra's avatar James Bergstra

changed isinf -> std::isinf which helped to compile on my mac

上级 3679d8e6
...@@ -125,7 +125,7 @@ class SoftmaxWithBias(gof.Op): ...@@ -125,7 +125,7 @@ class SoftmaxWithBias(gof.Op):
return dx, db return dx, db
def c_headers(self): def c_headers(self):
return ['<iostream>'] return ['<iostream> <math>']
@staticmethod @staticmethod
def c_code_template(): def c_code_template():
...@@ -214,7 +214,7 @@ class SoftmaxWithBias(gof.Op): ...@@ -214,7 +214,7 @@ class SoftmaxWithBias(gof.Op):
sum += sm_ij; sum += sm_ij;
sm_i[j * Ssm] = sm_ij; sm_i[j * Ssm] = sm_ij;
} }
if ( (0.0 == sum) || (isinf(sum))) if ( (0.0 == sum) || (std::isinf(sum)))
{ {
//that was our best... //that was our best...
%(fail)s; %(fail)s;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论