提交 0bf0a20a authored 作者: Razvan Pascanu's avatar Razvan Pascanu

rename n_steps to avoid collision

also make sure it has the right sign
上级 280aab99
...@@ -146,9 +146,11 @@ class TestScan(unittest.TestCase): ...@@ -146,9 +146,11 @@ class TestScan(unittest.TestCase):
""" """
# Check if you need to go back in time over the sequences (the # Check if you need to go back in time over the sequences (the
# first argument is n_steps, the second is go_backwards) # first argument is n_steps, the second is go_backwards)
n_steps = args[0] nsteps = args[0]
invert = False invert = False
if n_steps < 0 or args[1]: if args[1]:
nsteps = nsteps * -1
if nsteps < 0:
new_ins = [x[::-1] for x in args[2: 2 + n_ins]] new_ins = [x[::-1] for x in args[2: 2 + n_ins]]
n_steps = abs(n_steps) n_steps = abs(n_steps)
# Simplify the inputs by slicing them according to the taps # Simplify the inputs by slicing them according to the taps
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论