我在这一点上陷入困境,我已经开始了kapathy博客的“pong from pixel”,我想通过整合CNN模型改进这一点,然后我从GG获得了这个导师。
**链接到这里:
https://github.com/yshvrdhn/Pong-Agent-Using-Policy-Gradients/blob/master/pong_keras.py
但我不能跑,也不知道这条线的用法: model = learning_model(),有人可以帮助我吗???
编译这些代码后得到的***错误:
Traceback (most recent call last):
File "C:\Users\thinh dang\Desktop\pong\kerasDemo.py", line 3, in <module>
from keras.models import Sequential
File "C:\Python27\lib\site-packages\keras\__init__.py", line 3, in <module>
from . import utils
File "C:\Python27\lib\site-packages\keras\utils\__init__.py", line 6, in <module>
from . import conv_utils
File "C:\Python27\lib\site-packages\keras\utils\conv_utils.py", line 9, in <module>
from .. import backend as K
File "C:\Python27\lib\site-packages\keras\backend\__init__.py", line 84, in <module>
from .theano_backend import *
File "C:\Python27\lib\site-packages\keras\backend\theano_backend.py", line 7, in <module>
import theano
File "C:\Python27\lib\site-packages\theano\__init__.py", line 110, in <module>
from theano.compile import (
File "C:\Python27\lib\site-packages\theano\compile\__init__.py", line 12, in <module>
from theano.compile.mode import *
File "C:\Python27\lib\site-packages\theano\compile\mode.py", line 11, in <module>
import theano.gof.vm
File "C:\Python27\lib\site-packages\theano\gof\vm.py", line 674, in <module>
from . import lazylinker_c
File "C:\Python27\lib\site-packages\theano\gof\lazylinker_c.py", line 140, in <module>
preargs=args)
File "C:\Python27\lib\site-packages\theano\gof\cmodule.py", line 2388, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): The system cannot find the path specified.
答案 0 :(得分:1)
看起来你没有安装theano
。你可以这样做:
pip install theano
作为一个侧面建议,我还建议使用虚拟环境,这样可以更容易地隔离您的项目。
答案 1 :(得分:0)
我建议与Anaconda合作。