提交 8d7667c2 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Disable output_merge when the replacement does not have the same

broadcastable pattern as the original.
上级 fbd95029
...@@ -98,6 +98,10 @@ def output_merge(cls, alpha_in, beta_in, out_in, nd): ...@@ -98,6 +98,10 @@ def output_merge(cls, alpha_in, beta_in, out_in, nd):
if not is_equal(targ.inputs[beta_in], 0.0): if not is_equal(targ.inputs[beta_in], 0.0):
# other cases are too complex for now # other cases are too complex for now
return None return None
if W.broadcastable != targ.inputs[out_in].broadcastable:
# Would need to explicitly tile the output to fill
# the full shape here. Disable for now.
return None
inputs = list(targ.inputs) inputs = list(targ.inputs)
inputs[out_in] = W inputs[out_in] = W
inputs[beta_in] = _one.clone() inputs[beta_in] = _one.clone()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论