I'm trying to use that Object as This Blog uses in His Code but when I do from rl.agents.dqn import DQfDAgent
it returns me and error ImportError: cannot import name 'DQfDAgent'
.
I've done a dir(rl.agents.dqn)
and there is no DQfDAgent
object so, how has the man of the blog done it?
(Update 1)
I've already done this:
pip install -e git+git://github.com/jakegrigsby/keras-rl.git#egg=keras-rl
but it returns this error:
Command "git clone -q git://github.com/jakegrigsby/keras-rl.git C:\Users\myuser\src\keras-rl" failed with error code 128 in None
note that the master version of keras-rl may be missing my additions. See my fork.
Just do a quick search for DQfDAgent and you ll see that it is not in the rl.agents.dqn source code page. Use the branch of the author ( here ) to import properly and use the agent he has implemented but which is not in the official version.
The README.md file of the repo you linked indicates that:
Note that the master version of keras-rl may be missing my additions. See my fork .
In such a fork, you can find an implementation of DQfDAgent in the following code: https://github.com/jakegrigsby/keras-rl/blob/master/rl/agents/dqn.py
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.