未验证 提交 e25b475c 编写于 作者: C Christian Clauss 提交者: GitHub

Avoid SyntaxWarning on Python >= 3.8 (#304)

% `python3.8`
```
>>> 0 is 0
<stdin>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
>>> 'Double' is 'Double'
<stdin>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
```
上级 aa81b0f1
......@@ -121,7 +121,7 @@ def main():
model = AtariModel(CONTEXT_LEN, act_dim, args.algo)
if args.algo in ['DQN', 'Dueling']:
algorithm = DQN(model, gamma=GAMMA, lr=args.lr)
elif args.algo is 'Double':
elif args.algo == 'Double':
algorithm = DDQN(model, gamma=GAMMA, lr=args.lr)
agent = AtariAgent(algorithm, act_dim=act_dim)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册