提交 43c6f89e authored 作者: Frederic Bastien's avatar Frederic Bastien

lower a little bit theano overhead by removing call to enumerate as is it slow.…

lower a little bit theano overhead by removing call to enumerate as is it slow. Anyway, the index was already available otherwise.
上级 14644d0a
...@@ -511,7 +511,7 @@ class Function(object): ...@@ -511,7 +511,7 @@ class Function(object):
# Set positional arguments # Set positional arguments
i = 0 i = 0
for arg_index, arg in enumerate(args): for arg in args:
#TODO: provide a Param option for skipping the filter if we #TODO: provide a Param option for skipping the filter if we
# really want speed. # really want speed.
s = self.input_storage[i] s = self.input_storage[i]
...@@ -523,7 +523,7 @@ class Function(object): ...@@ -523,7 +523,7 @@ class Function(object):
allow_downcast=s.allow_downcast) allow_downcast=s.allow_downcast)
except Exception, e: except Exception, e:
e.args = tuple(list(e.args)+["Bad input argument at index %d" % arg_index]) e.args = tuple(list(e.args)+["Bad input argument at index %d" % i])
raise raise
s.provided += 1 s.provided += 1
i+=1 i+=1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论