提交 f6f341cc authored 作者: khaotik's avatar khaotik

flake8

上级 ac0b0a32
...@@ -610,8 +610,9 @@ class Scan(PureOp): ...@@ -610,8 +610,9 @@ class Scan(PureOp):
# The vector_seqs and vector_outs are just a workaround # The vector_seqs and vector_outs are just a workaround
# strange NumPy behavior: vector_ndarray[int] return a NumPy # strange NumPy behavior: vector_ndarray[int] return a NumPy
# scalar and not a NumPy ndarray of 0 dimensions. # scalar and not a NumPy ndarray of 0 dimensions.
is_cpu_vector = lambda s: isinstance(s.type, tensor.TensorType) \ def is_cpu_vector(s):
and s.ndim == 1 return isinstance(s.type, tensor.TensorType) and s.ndim == 1
self.vector_seqs = [ self.vector_seqs = [
is_cpu_vector(seq) for seq in new_inputs[1:1 + self.n_seqs]] is_cpu_vector(seq) for seq in new_inputs[1:1 + self.n_seqs]]
self.vector_outs = [ self.vector_outs = [
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论