Skip to content

Commit 23d031c

Browse files
committed
增加了test模块
1 parent 53d1aea commit 23d031c

File tree

1 file changed

+110
-3
lines changed

1 file changed

+110
-3
lines changed

09. theano/09.01 introduction and installation.ipynb

Lines changed: 110 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"source": [
4545
"`windows` 下,使用 `anaconda` 安装 `theano` 的命令为:\n",
4646
"\n",
47-
" conda install mingw, libpython\n",
47+
" conda install mingw libpython\n",
4848
" pip install theano\n",
4949
" \n",
5050
"`linux` 下,使用 `anaconda` 安装的命令为\n",
@@ -60,7 +60,8 @@
6060
"cell_type": "code",
6161
"execution_count": 1,
6262
"metadata": {
63-
"collapsed": false
63+
"collapsed": false,
64+
"scrolled": true
6465
},
6566
"outputs": [
6667
{
@@ -79,6 +80,112 @@
7980
"\n",
8081
"theano.__version__"
8182
]
83+
},
84+
{
85+
"cell_type": "markdown",
86+
"metadata": {},
87+
"source": [
88+
"查看当前使用的 device:"
89+
]
90+
},
91+
{
92+
"cell_type": "code",
93+
"execution_count": 2,
94+
"metadata": {
95+
"collapsed": false
96+
},
97+
"outputs": [
98+
{
99+
"data": {
100+
"text/plain": [
101+
"'cpu'"
102+
]
103+
},
104+
"execution_count": 2,
105+
"metadata": {},
106+
"output_type": "execute_result"
107+
}
108+
],
109+
"source": [
110+
"theano.config.device"
111+
]
112+
},
113+
{
114+
"cell_type": "markdown",
115+
"metadata": {},
116+
"source": [
117+
"运行测试:"
118+
]
119+
},
120+
{
121+
"cell_type": "code",
122+
"execution_count": 3,
123+
"metadata": {
124+
"collapsed": false
125+
},
126+
"outputs": [
127+
{
128+
"name": "stderr",
129+
"output_type": "stream",
130+
"text": [
131+
"C:\\Miniconda\\lib\\site-packages\\theano\\misc\\pycuda_init.py:34: UserWarning: PyCUDA import failed in theano.misc.pycuda_init\n",
132+
" warnings.warn(\"PyCUDA import failed in theano.misc.pycuda_init\")\n",
133+
"Using gpu device 0: GeForce GTX 850M\n",
134+
"...............................................K..................C:\\Miniconda\\lib\\site-packages\\theano\\compile\\profilemode.py:103: UserWarning: DEPRECATION WARNING: The ProfileMode is deprecated. Use the Theano flags/parameter to theano.function 'profile=True' instead of 'mode=ProfileMode'\n",
135+
" \"DEPRECATION WARNING: The ProfileMode is deprecated. Use the Theano\"\n",
136+
"..................................................C:\\Miniconda\\lib\\site-packages\\theano\\gof\\vm.py:729: UserWarning: CVM does not support memory profile, using Stack VM.\n",
137+
" 'CVM does not support memory profile, using Stack VM.')\n",
138+
".................................C:\\Miniconda\\lib\\site-packages\\theano\\scan_module\\scan_perform_ext.py:133: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility\n",
139+
" from scan_perform.scan_perform import *\n",
140+
".........................................................................................................................................SS..SSS.............SS...................................................................................................."
141+
]
142+
},
143+
{
144+
"name": "stdout",
145+
"output_type": "stream",
146+
"text": [
147+
"Theano version 0.7.0\n",
148+
"theano is installed in C:\\Miniconda\\lib\\site-packages\\theano\n",
149+
"NumPy version 1.9.2\n",
150+
"NumPy is installed in C:\\Miniconda\\lib\\site-packages\\numpy\n",
151+
"Python version 2.7.9 |Anaconda 2.3.0 (64-bit)| (default, Dec 18 2014, 16:57:52) [MSC v.1500 64 bit (AMD64)]\n",
152+
"nose version 1.3.7\n"
153+
]
154+
},
155+
{
156+
"name": "stderr",
157+
"output_type": "stream",
158+
"text": [
159+
"\n",
160+
"----------------------------------------------------------------------\n",
161+
"Ran 409 tests in 242.481s\n",
162+
"\n",
163+
"OK (KNOWNFAIL=1, SKIP=7)\n"
164+
]
165+
},
166+
{
167+
"data": {
168+
"text/plain": [
169+
"<nose.result.TextTestResult run=409 errors=0 failures=0>"
170+
]
171+
},
172+
"execution_count": 3,
173+
"metadata": {},
174+
"output_type": "execute_result"
175+
}
176+
],
177+
"source": [
178+
"theano.test()"
179+
]
180+
},
181+
{
182+
"cell_type": "markdown",
183+
"metadata": {},
184+
"source": [
185+
"这里我已经在本地 `Windows` 配好了 `GPU` 的设置,如果没有配好,显示的结果可能不一样。\n",
186+
"\n",
187+
"`Windows` 下第一次运行可能会显示 `DEBUG: nvcc STDOUT` 等内容,**`Just ignore it!`**"
188+
]
82189
}
83190
],
84191
"metadata": {
@@ -97,7 +204,7 @@
97204
"name": "python",
98205
"nbconvert_exporter": "python",
99206
"pygments_lexer": "ipython2",
100-
"version": "2.7.10"
207+
"version": "2.7.9"
101208
}
102209
},
103210
"nbformat": 4,

0 commit comments

Comments
 (0)