提交 ac4abf77 authored 作者: Frederic Bastien's avatar Frederic Bastien

Also register in fast_compile on the CPU to only compute the forward when the grad isn't needed.

上级 5794f14a
...@@ -224,7 +224,7 @@ def ctc(activations, labels, input_lengths): ...@@ -224,7 +224,7 @@ def ctc(activations, labels, input_lengths):
# Disable gradient computation if not needed # Disable gradient computation if not needed
@register_canonicalize @register_canonicalize('fast_compile')
@local_optimizer([ConnectionistTemporalClassification]) @local_optimizer([ConnectionistTemporalClassification])
def local_ctc_no_grad(node): def local_ctc_no_grad(node):
if isinstance(node.op, ConnectionistTemporalClassification): if isinstance(node.op, ConnectionistTemporalClassification):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论