Sør*_*sen 3 python-3.x theano lasagne
所以我终于设法使用本指南让theano在GPU上运行.(测试代码运行正常,告诉我它使用了GPU,YAY !!)然后我想尝试一下并按照本指南培训CNN数字识别.
问题是:我从lasagne调用theano的方式得到错误(我猜这里有版本不匹配):
Using gpu device 0: GeForce GT 730M (CNMeM is disabled, cuDNN not available)
Traceback (most recent call last):
File "C:\Users\Soren Jensen\Desktop\CNN-test\CNNTest-one.py", line 7, in <module>
import lasagne
File "C:\Users\Soren Jensen\Anaconda3\lib\site-packages\lasagne\__init__.py", line 19, in <module>
from . import layers
File "C:\Users\Soren Jensen\Anaconda3\lib\site-packages\lasagne\layers\__init__.py", line 7, in <module>
from .pool import *
File "C:\Users\Soren Jensen\Anaconda3\lib\site-packages\lasagne\layers\pool.py", line 6, in <module>
from theano.tensor.signal import downsample
ImportError: cannot import name 'downsample'
Press any key to continue . . .
Run Code Online (Sandbox Code Playgroud)
从阅读有关错误信息,似乎"缩减样本"被改变,那么为什么我的千层面仍然在调用它?
试图更新我的烤宽面条版本给出:
C:\WINDOWS\system32>pip3.5 install Lasagne==0.1
Collecting Lasagne==0.1
Requirement already satisfied: numpy in c:\users\soren jensen\anaconda3\lib\site-packages (from Lasagne==0.1)
Run Code Online (Sandbox Code Playgroud)
并运行代码示例
import theano
import os
print(theano.config.compiledir)
print("Theano version %s" % theano.__version__)
theano_dir = os.path.dirname(theano.__file__)
print("theano is installed in %s" % theano_dir)
Run Code Online (Sandbox Code Playgroud)
揭示python3.5使用theano v 0.9
Using gpu device 0: GeForce GT 730M (CNMeM is disabled, cuDNN not available)
C:\theano_compiledir\compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-3.5.2-64
Theano version 0.9.0.dev-e5bedc0de240eca42433c34c05fc00f4a5ef6cbe
theano is installed in C:\Users\Soren Jensen\Anaconda3\lib\site-packages\theano\theano
Press any key to continue . . .
Run Code Online (Sandbox Code Playgroud)
很抱歉很长的帖子,但我有点疯狂,这不工作..也许我错了版本不匹配,错误是别的吗?
小智 8
尝试重新安装Theano和Lasagne,如下所示:
pip install --upgrade https://github.com/Theano/Theano/archive/master.zip
pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip
Run Code Online (Sandbox Code Playgroud)
因为:"Theano的更新版本通常也会起作用,但在撰写本文时,一个简单的点子安装Theano会给你一个太老的版本."
阅读更多:lasagne.readthedocs.io/en/latest/user/installation.html
| 归档时间: |
|
| 查看次数: |
1893 次 |
| 最近记录: |