提交 7dc4b682 authored 作者: affanv14's avatar affanv14

add comment to explain operation

上级 42382811
......@@ -501,6 +501,8 @@ class _tensor_py_operators(object):
args[ellipsis_at: ellipsis_at + 1] = (
[slice(None)] * (self.ndim - (len(args) - 1 - new_axes)))
# Force input to be int64 datatype if input is an empty list or tuple
# Else leave it as is if it is a real number
args = tuple([numpy.array(inp, dtype=numpy.int64)
if(inp == [] or inp == ()) else inp for inp in args])
# Convert python literals to theano constants
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论