提交 237b5af4 authored 作者: Frederic Bastien's avatar Frederic Bastien

don't try to replace node that won't be accepted.

上级 fca2dec9
...@@ -54,6 +54,7 @@ class InputToGpuOptimizer(Optimizer): ...@@ -54,6 +54,7 @@ class InputToGpuOptimizer(Optimizer):
try: try:
new_input = host_from_gpu(gpu_from_host(input)) new_input = host_from_gpu(gpu_from_host(input))
if new_input.type==input.type:
env.replace_validate(input, new_input, "To allow further optimisation to move Ops to gpu") env.replace_validate(input, new_input, "To allow further optimisation to move Ops to gpu")
except Exception, e: except Exception, e:
#as we currently only support float32, this can fail. #as we currently only support float32, this can fail.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论