lasagne库使用说明

上传人:第*** 文档编号:61701082 上传时间:2018-12-10 格式:PDF 页数:121 大小:717.45KB
返回 下载 相关 举报
lasagne库使用说明_第1页
第1页 / 共121页
lasagne库使用说明_第2页
第2页 / 共121页
lasagne库使用说明_第3页
第3页 / 共121页
lasagne库使用说明_第4页
第4页 / 共121页
lasagne库使用说明_第5页
第5页 / 共121页
点击查看更多>>
资源描述

《lasagne库使用说明》由会员分享,可在线阅读,更多相关《lasagne库使用说明(121页珍藏版)》请在金锄头文库上搜索。

1、lasagne Documentation Release 0.2.dev1 Lasagne contributors March 03, 2016 Contents 1User Guide3 1.1Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 1.2Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2、. . . . . . . . . . .6 1.3Layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 1.4Creating custom layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 1.5Development . . . . . . . . . . . . . . . . . . . .

3、 . . . . . . . . . . . . . . . . . . . . . . . . . . .19 2API Reference23 2.1lasagne.layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 2.2lasagne.updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80 2.3lasagne.init

4、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90 2.4lasagne.nonlinearities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93 2.5lasagne.objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97 2.6lasa

5、gne.regularization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 2.7lasagne.random . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 2.8lasagne.utils . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6、 . . . 105 3Indices and tables109 Bibliography111 Python Module Index113 i ii lasagne Documentation, Release 0.2.dev1 Lasagne is a lightweight library to build and train neural networks in Theano. Lasagne is a work in progress, input is welcome. The available documentation is limited for now. The pr

7、oject is on GitHub. Contents1 lasagne Documentation, Release 0.2.dev1 2Contents CHAPTER1 User Guide The Lasagne user guide explains how to install Lasagne, how to build and train neural networks using Lasagne, and how to contribute to the library as a developer. 1.1 Installation Lasagne has a couple

8、 of prerequisites that need to be installed fi rst, but it is not very picky about versions. The single exception is Theano: Due to its tight coupling to Theano, you will have to install a recent version of Theano (usually more recent than the latest offi cial release!) fi tting the version of Lasag

9、ne you choose to install. Most of the instructions below assume you are running a Linux or Mac system; please do not hesitate to suggest instructions for Windows via the Edit on GitHub link on the top right! If you run into any trouble, please check the Theano installation instructions which cover i

10、nstalling the prerequisites for a range of operating systems, or ask for help on our mailing list. 1.1.1 Prerequisites Python + pip Lasagne currently requires Python 2.7 or 3.4 to run. Please install Python via the package manager of your operating system if it is not included already. Python includ

11、es pip for installing additional modules that are not shipped with your operating system, or shipped in an old version, and we will make use of it below. We recommend installing these modules into your home directory via -user, or into a virtual environment via virtualenv. C compiler Theano requires

12、 a working C compiler, and numpy/scipy require a compiler as well if you install them via pip. On Linux, the default compiler is usually gcc, and on Mac OS, its clang. Again, please install them via the package manager of your operating system. numpy/scipy + BLAS Lasagne requires numpy of version 1.

13、6.2 or above, and Theano also requires scipy 0.11 or above. Numpy/scipy rely on a BLAS library to provide fast linear algebra routines. They will work fi ne without one, but a lot slower, so it is worth getting this right (but this is less important if you plan to use a GPU). 3 lasagne Documentation

14、, Release 0.2.dev1 If you install numpy and scipy via your operating systems package manager, they should link to the BLAS library installed in your system. If you install numpy and scipy via pip install numpy and pip install scipy, make sure to have development headers for your BLAS library install

15、ed (e.g., the libopenblas-dev package on Debian/Ubuntu) while running the installation command. Please refer to the numpy/scipy build instructions if in doubt. Theano The version to install depends on the Lasagne version you choose, so this will be handled below. 1.1.2 Stable Lasagne release Lasagne

16、 0.1 requires a more recent version of Theano than the one available on PyPI. To install a version that is known to work, run the following command: pip install -r https:/ Warning:An even more recent version of Theano will often work as well, but at the time of writing, a simple pip install Theano will give you a version that is too old. To install release 0.1 of Lasagne from PyPI, run the following command: pip install Lasagne=

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 解决方案

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号