|
44 | 44 | "source": [
|
45 | 45 | "`windows` 下,使用 `anaconda` 安装 `theano` 的命令为:\n",
|
46 | 46 | "\n",
|
47 |
| - " conda install mingw, libpython\n", |
| 47 | + " conda install mingw libpython\n", |
48 | 48 | " pip install theano\n",
|
49 | 49 | " \n",
|
50 | 50 | "`linux` 下,使用 `anaconda` 安装的命令为\n",
|
|
60 | 60 | "cell_type": "code",
|
61 | 61 | "execution_count": 1,
|
62 | 62 | "metadata": {
|
63 |
| - "collapsed": false |
| 63 | + "collapsed": false, |
| 64 | + "scrolled": true |
64 | 65 | },
|
65 | 66 | "outputs": [
|
66 | 67 | {
|
|
79 | 80 | "\n",
|
80 | 81 | "theano.__version__"
|
81 | 82 | ]
|
| 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 | + ] |
82 | 189 | }
|
83 | 190 | ],
|
84 | 191 | "metadata": {
|
|
97 | 204 | "name": "python",
|
98 | 205 | "nbconvert_exporter": "python",
|
99 | 206 | "pygments_lexer": "ipython2",
|
100 |
| - "version": "2.7.10" |
| 207 | + "version": "2.7.9" |
101 | 208 | }
|
102 | 209 | },
|
103 | 210 | "nbformat": 4,
|
|
0 commit comments