提交 1ccf33c5 authored 作者: Frederic Bastien's avatar Frederic Bastien

update comment.

上级 92ef1403
...@@ -3533,7 +3533,10 @@ def stack(*tensors): ...@@ -3533,7 +3533,10 @@ def stack(*tensors):
# Doing it here make the graph less canonicalized # Doing it here make the graph less canonicalized
# (more type need to be understood by all optimization) # (more type need to be understood by all optimization)
# And DebugMode can't detect error in this code as it is not in an optimization. # And DebugMode can't detect error in this code as it is not in an optimization.
if numpy.all([isinstance(t, (numpy.number, float, int, python_complex)) or #in case their is direct int # See ticket #660
if numpy.all([
# in case their is direct int in tensors.
isinstance(t, (numpy.number, float, int, python_complex)) or
(isinstance(t, Variable) and (isinstance(t, Variable) and
isinstance(t.type, TensorType) and isinstance(t.type, TensorType) and
t.ndim==0) t.ndim==0)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论