提交 2af0f5e5 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Add mission semicolon.

上级 7f154d35
...@@ -2106,7 +2106,7 @@ class Cast(UnaryScalarOp): ...@@ -2106,7 +2106,7 @@ class Cast(UnaryScalarOp):
(x,) = inputs (x,) = inputs
(z,) = outputs (z,) = outputs
if node.outputs[0].type == bool: if node.outputs[0].type == bool:
return "%s = (%s) ? 1 : 0" % (z, x) return "%s = (%s) ? 1 : 0;" % (z, x)
return "%s = (%s)%s;" % (z, node.outputs[0].type.dtype_specs()[1], x) return "%s = (%s)%s;" % (z, node.outputs[0].type.dtype_specs()[1], x)
def grad(self, inputs, gout): def grad(self, inputs, gout):
......
...@@ -75,7 +75,7 @@ class ScalarSigmoid(scalar.UnaryScalarOp): ...@@ -75,7 +75,7 @@ class ScalarSigmoid(scalar.UnaryScalarOp):
# float16 limits: -11.0, 7.0f # float16 limits: -11.0, 7.0f
# We use the float32 limits for float16 for now as the # We use the float32 limits for float16 for now as the
# computation will happend in float32 anyway. # computation will happen in float32 anyway.
if (node.inputs[0].type == scalar.float32 or if (node.inputs[0].type == scalar.float32 or
node.inputs[0].type == scalar.float16): node.inputs[0].type == scalar.float16):
return """%(z)s = %(x)s < -88.0f ? 0.0 : %(x)s > 15.0f ? 1.0f : 1.0f /(1.0f + exp(-%(x)s));""" % locals() return """%(z)s = %(x)s < -88.0f ? 0.0 : %(x)s > 15.0f ? 1.0f : 1.0f /(1.0f + exp(-%(x)s));""" % locals()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论