提交 0c53299e authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #4856 from ozancaglayan/fix-entropy-string

sandbox/cuda: Fix crossentropy typos
...@@ -1352,8 +1352,9 @@ def cast(x, dtype): ...@@ -1352,8 +1352,9 @@ def cast(x, dtype):
@register_opt() @register_opt()
@local_optimizer([tensor.nnet.CrossentropySoftmaxArgmax1HotWithBias]) @local_optimizer([tensor.nnet.CrossentropySoftmaxArgmax1HotWithBias],
def local_gpu_crossentorpy_softmax_argmax_1hot_with_bias(node): 'local_gpu_crossentorpy_softmax_argmax_1hot_with_bias')
def local_gpu_crossentropy_softmax_argmax_1hot_with_bias(node):
if isinstance(node.op, tensor.nnet.CrossentropySoftmaxArgmax1HotWithBias): if isinstance(node.op, tensor.nnet.CrossentropySoftmaxArgmax1HotWithBias):
x, b, y = node.inputs x, b, y = node.inputs
if x.owner and isinstance(x.owner.op, HostFromGpu): if x.owner and isinstance(x.owner.op, HostFromGpu):
...@@ -1381,8 +1382,9 @@ def local_gpu_crossentorpy_softmax_argmax_1hot_with_bias(node): ...@@ -1381,8 +1382,9 @@ def local_gpu_crossentorpy_softmax_argmax_1hot_with_bias(node):
@register_opt() @register_opt()
@local_optimizer([tensor.nnet.CrossentropySoftmax1HotWithBiasDx]) @local_optimizer([tensor.nnet.CrossentropySoftmax1HotWithBiasDx],
def local_gpu_crossentorpy_softmax_1hot_with_bias_dx(node): 'local_gpu_crossentorpy_softmax_1hot_with_bias_dx')
def local_gpu_crossentropy_softmax_1hot_with_bias_dx(node):
if isinstance(node.op, tensor.nnet.CrossentropySoftmax1HotWithBiasDx): if isinstance(node.op, tensor.nnet.CrossentropySoftmax1HotWithBiasDx):
dnll, sm, yidx = node.inputs dnll, sm, yidx = node.inputs
if sm.owner and isinstance(sm.owner.op, HostFromGpu): if sm.owner and isinstance(sm.owner.op, HostFromGpu):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论