提交 30ced3df authored 作者: Hengjean's avatar Hengjean 提交者: Frederic

Added type verification

上级 ea1e0b65
...@@ -1132,6 +1132,10 @@ class FunctionMaker(object): ...@@ -1132,6 +1132,10 @@ class FunctionMaker(object):
# two graphs are for sure different # two graphs are for sure different
print 'need to optimize, because output size is different' print 'need to optimize, because output size is different'
continue continue
elif not all(input_new.type == input_old.type for
input_new, input_old in zip(inputs_new, inputs_old)):
print 'need to optimize, because inputs are of different types'
continue
else: else:
# when the both inputs are of the same size # when the both inputs are of the same size
givens = dict(zip(inputs_new, inputs_old)) givens = dict(zip(inputs_new, inputs_old))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论