Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
ef3f524a
提交
ef3f524a
authored
3月 16, 2012
作者:
Olivier Delalleau
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #550 from lamblin/win64_install
Installation instructions, and test fixes, for windows
上级
ab56ecc1
cb831893
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
98 行增加
和
16 行删除
+98
-16
NEWS.txt
NEWS.txt
+5
-0
op.txt
doc/extending/op.txt
+3
-0
optimization.txt
doc/extending/optimization.txt
+1
-0
pipeline.txt
doc/extending/pipeline.txt
+1
-0
install.txt
doc/install.txt
+68
-6
docgen.py
doc/scripts/docgen.py
+4
-3
test_shared.py
theano/compile/tests/test_shared.py
+2
-3
cmodule.py
theano/gof/cmodule.py
+7
-0
basic.py
theano/tensor/basic.py
+7
-4
没有找到文件。
NEWS.txt
浏览文件 @
ef3f524a
...
...
@@ -7,6 +7,7 @@ Documentation
This explains how to make a Theano Op from a Python function.
http://deeplearning.net/software/theano/tutorial/extending_theano.html
(Frédéric B.)
* New installation instructions for Windows using EPD (Pascal L.)
Interface changes
* In 0.5, we removed the deprecated sharedvar.value property.
...
...
@@ -46,6 +47,8 @@ Sparse Sandbox Additions (not reviewed/documented/tested, but used by some peopl
Internal changes
* Define new exceptions MissingInputError and UnusedInputError, and use them
in theano.function, instead of TypeError and ValueError. (Pascal L.)
* Better handling of bitwidth and max values of integers and pointers
across platforms (Pascal L.)
Crash Fix
* Do not try to use the BLAS library when blas.ldflags is manually set to an
...
...
@@ -62,6 +65,8 @@ Crash Fix
(Frederic B., reported by Sander Dieleman)
* GpuSoftmaxWithBias with shape (0, N) with N > 1.
(Frédéric B., reported by Razvan P.)
* Fix crash under 64-bit Windows, when taking subtensors of the form a[n:]
(Pascal L., reported by Simon McGregor)
=============
Release Notes
...
...
doc/extending/op.txt
浏览文件 @
ef3f524a
...
...
@@ -289,6 +289,7 @@ node representing the application of Op ``mul`` to inputs ``x`` and
``y``, giving a Variable instance of type ``double`` as the output.
.. note::
Theano relies on the fact that if you call the ``make_node`` method
of Apply's first argument on the inputs passed as the Apply's
second argument, the call will not fail and the returned Apply
...
...
@@ -315,6 +316,7 @@ contain a single storage cell for the multiplication's variable.
Here, ``z`` is a list of one element. By default, ``z == [None]``.
.. note::
It is possible that ``z`` does not contain ``None``. If it contains
anything else, Theano guarantees that whatever it contains is what
``perform`` put there the last time it was called with this
...
...
@@ -324,6 +326,7 @@ Here, ``z`` is a list of one element. By default, ``z == [None]``.
:ref:`op` documentation.
.. warning::
We gave ``z`` the Theano type ``double`` in ``make_node``, which means
that a Python ``float`` must be put there. You should not put, say, an
``int`` in ``z[0]`` because Theano assumes Ops handle typing properly.
...
...
doc/extending/optimization.txt
浏览文件 @
ef3f524a
...
...
@@ -232,6 +232,7 @@ arithmetics that your Ops implement. Theano might provide facilities
for this somewhere in the future.
.. note::
:class:`Env` is a Theano structure intended for the optimization
phase. It is used internally by function and Module and is rarely
exposed to the end user. You can use it to test out optimizations,
...
...
doc/extending/pipeline.txt
浏览文件 @
ef3f524a
...
...
@@ -98,6 +98,7 @@ case if ``borrow`` was True, the thunk would be allowed to reuse (or
"recycle") the storage).
.. note::
Compiled libraries are stored within a specific compilation directory,
which by default is set to ``$HOME/.theano/compiledir_xxx``, where
``xxx`` identifies the platform (under Windows the default location
...
...
doc/install.txt
浏览文件 @
ef3f524a
...
...
@@ -600,7 +600,51 @@ Windows
Installing Dependencies
~~~~~~~~~~~~~~~~~~~~~~~
If neither Python nor MinGW is installed on your computer, the easiest way to
In academia: EPD
################
If you are working in academia, the easiest way to install most of the
dependencies is to install `Enthought Python Distribution (EPD) <epd>`_.
If you are affiliated to a university (as student or employee), you can
download the installation for free.
EPD installation includes in particular Python (and the development headers),
numpy, scipy, nose, sphinx, easy_install, pydot (but *not* `Graphviz`_, which is
necessary for it to work), g++, and the MKL
implementation of blas.
If you want to use the iPython shell, you should first try to import numpy
in it::
C:\Users\user>ipython
[...]
In [1]: import numpy
If you see an error message telling you that ``DLL load failed``, that is
probably due to a bug in the script launching ipython. If ``C:\Python27``
is the directory where you installed EPD, edit
``C:\Python27\Scripts\ipython.bat``, there should be a line saying::
set path="C:\Python27";%path%
Remove the quotes around ``Python27``, leading to::
set path=C:\Python27;%path%
Then, it should work in all new terminals.
pip is not included in EPD, but you can simply install it with::
easy_install pip
.. _epd: http://enthought.com/products/epd.php
.. _Graphviz: http://www.graphviz.org/Download_windows.php
Alternative: Python(x,y)
########################
If you are not eligible to a free download of EPD, and
neither Python nor MinGW is installed on your computer, the easiest way to
install most dependencies is to install
`Python(x,y) <http://www.pythonxy.com>`__.
It is a single installation
...
...
@@ -664,20 +708,28 @@ components as in Python(x,y) that are required by Theano, follow these steps:
At this point, whether you installed Python(x,y) or individual components, you
should have MinGW, Python, Numpy, Scipy and Nose installed.
In order to download Theano you will also need Git, which you can get
`here <http://git-scm.com/download>`__ (download the latest version of the
"Full installer for official Git" from the ``msysgit`` download page).
Installing Theano
~~~~~~~~~~~~~~~~~
It should be possible to install Theano with ``pip`` as described in
:ref:`linux_basic`, but this has not been tested yet under Windows. We describe
It is possible to install Theano with ``pip`` as described in
:ref:`linux_basic`. However, if you want to get the latest development version,
or edit the code, you should follow the instructions below.
Bleeding-edge installation
##########################
We describe
here instructions to use the latest code repository version (bleeding-edge).
Command lines listed below are assumed to be run in a Windows prompt
(click ``Start`` and type the ``cmd`` command), and may need to be adapted if
used within a MinGW Shell (not available if you only installed Python(x,y)).
You will need Git, which you can get
`here <http://git-scm.com/download>`__ (download the latest version of the
"Full installer for official Git" from the ``msysgit`` download page).
- Navigate into the directory you want Theano to be installed in, and download
it with
...
...
@@ -695,6 +747,13 @@ used within a MinGW Shell (not available if you only installed Python(x,y)).
C:\Users\login>echo %PYTHONPATH%
C:\Users\login\Theano
Configure Theano
################
If you installed Python through EPD, you should be all set by now. Otherwise,
whether you installed Theano through pip or git, you should follow these
steps.
- Create a new ``.theanorc`` text file (or ``.theanorc.txt``, whichever is easier
for you to create under Windows) in your user profile directory (the directory you
are into when you start a new command prompt with ``cmd``), containing the
...
...
@@ -762,6 +821,9 @@ the Visual Studio editor.
Compiling a faster BLAS
~~~~~~~~~~~~~~~~~~~~~~~
If you installed Python through EPD, Theano will automatically link with the
MKL library included in EPD, so you should not need to compile your own BLAS.
.. note::
GotoBLAS is no longer maintained and has been released under the BSD
...
...
doc/scripts/docgen.py
浏览文件 @
ef3f524a
...
...
@@ -57,8 +57,9 @@ import getopt
from
collections
import
defaultdict
if
__name__
==
'__main__'
:
throot
=
"/"
.
join
(
sys
.
path
[
0
]
.
split
(
"/"
)[:
-
2
])
# Equivalent of sys.path[0]/../..
throot
=
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
path
[
0
],
os
.
pardir
,
os
.
pardir
))
options
=
defaultdict
(
bool
)
options
.
update
(
dict
([
x
,
y
or
True
]
for
x
,
y
in
...
...
@@ -91,7 +92,7 @@ if __name__ == '__main__':
# Make sure the appropriate 'theano' directory is in the PYTHONPATH
pythonpath
=
os
.
environ
.
get
(
'PYTHONPATH'
,
''
)
pythonpath
=
throot
+
':'
+
pythonpath
pythonpath
=
os
.
pathsep
.
join
([
throot
,
pythonpath
])
os
.
environ
[
'PYTHONPATH'
]
=
pythonpath
if
options
[
'--all'
]
or
options
[
'--epydoc'
]:
...
...
theano/compile/tests/test_shared.py
浏览文件 @
ef3f524a
...
...
@@ -250,7 +250,7 @@ class Test_SharedVariable(unittest.TestCase):
f
(
b
,
8
)
assert
b
.
get_value
()
==
8
b
=
shared
(
numpy
.
zeros
((
5
,
5
),
dtype
=
'float32'
)
,
allow_downcast
=
True
)
b
=
shared
(
numpy
.
zeros
((
5
,
5
),
dtype
=
'float32'
))
self
.
assertRaises
(
TypeError
,
f
,
b
,
numpy
.
random
.
rand
(
5
,
5
))
def
test_tensor_floatX
(
self
):
...
...
@@ -303,6 +303,5 @@ class Test_SharedVariable(unittest.TestCase):
f
(
b
,
[
8
])
assert
b
.
get_value
()
==
8
b
=
shared
(
numpy
.
zeros
((
5
,
5
),
dtype
=
'float32'
),
allow_downcast
=
True
)
b
=
shared
(
numpy
.
zeros
((
5
,
5
),
dtype
=
'float32'
))
self
.
assertRaises
(
TypeError
,
f
,
b
,
numpy
.
random
.
rand
(
5
,
5
))
theano/gof/cmodule.py
浏览文件 @
ef3f524a
...
...
@@ -1429,6 +1429,13 @@ class GCC_compiler(object):
# Under Windows it looks like fPIC is useless. Compiler warning:
# '-fPIC ignored for target (all code is position independent)'
preargs
.
append
(
'-fPIC'
)
if
sys
.
platform
==
'win32'
and
local_bitwidth
()
==
64
:
# Under 64-bits windows installation, sys.platform is 'win32'.
# We need to define MS_WIN64 for the preprocessor to be able to
# link with libpython.
preargs
.
append
(
'-DMS_WIN64'
)
no_opt
=
False
include_dirs
=
include_dirs
+
std_include_dirs
()
...
...
theano/tensor/basic.py
浏览文件 @
ef3f524a
...
...
@@ -341,10 +341,13 @@ def constant_or_value(x, rtype, name=None, ndim=None, dtype=None):
elif
rtype
is
TensorConstant
and
isinstance
(
x
,
float
):
x_
=
autocast_float
(
x
)
elif
rtype
is
TensorConstant
and
isinstance
(
x
,
long
):
# It is not clear what would happen if one was to use a `long`
# number as a constant in a Theano graph. As a result, we throw
# an exception in this situation.
raise
NotImplementedError
(
'Constants of type `long` not supported'
)
# We need to address the case where a long number is used in a
# Theano graph, because on Windows 64, all shapes are expressed
# with longs.
# If a long fits in int64, we convert it into an int64, like
# numpy.asarray() does.
# If x is too big, an OverflowError will be raised by numpy.
x_
=
theano
.
_asarray
(
x
,
dtype
=
'int64'
)
elif
isinstance
(
x
,
numpy
.
ndarray
):
x_
=
x
# Currently we do not have a bool dtype in Theano.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论