diff --git a/.gitignore b/.gitignore index e2b07a9..6d6397f 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,4 @@ distribute-*.tar.gz Theano.suo .ipynb_checkpoints .pydevproject - +.ropeproject diff --git a/.mailmap b/.mailmap index c59dab8..4c98878 100644 --- a/.mailmap +++ b/.mailmap @@ -15,6 +15,7 @@ Arnaud Bergeron David Warde-Farley David Warde-Farley David Warde-Farley David Warde Farley +David Warde-Farley David Warde-Farley Douglas Eck eckdoug@localhost Douglas Eck eckdoug@waits.local Dumitru Erhan dumitru@deepnets.mtv.corp.google.com @@ -42,6 +43,7 @@ Frederic Bastien bastienf@bikat.iro.umontreal.ca bastienf@ldapk3.scinet.utoronto.ca Frederic Bastien nouiz Frederic Bastien Frederic +Frederic Bastien Frédéric Bastien Grégoire Grégoire Guillaume Desjardins desjagui Guillaume Desjardins desjagui@atchoum.iro.umontreal.ca @@ -93,3 +95,65 @@ Xavier Glorot glorotxa Xavier Glorot glorotxa@timide.iro.umontreal.ca Yoshua Bengio bengioy@bengio-mac.local Sina Honari SinaHonari +Sina Honari Sina Honari +Pierre Luc Carrier --global +Pierre Luc Carrier Pierre Luc Carrier +Pierre Luc Carrier carriepl +Pierre Luc Carrier Pierre Luc Carrier +Pierre Luc Carrier Pierre Luc Carrier +Pierre Luc Carrier Pierre Luc Carrier +Pierre Luc Carrier Pierre Luc Carrier +Pierre Luc Carrier Pierre Luc Carrier +Pierre Luc Carrier Pierre Luc Carrier +Pierre Luc Carrier pl +Pierre Luc Carrier carriepl +Kyung Hyun Cho Kyunghyun Cho +Kyung Hyun Cho Kyunghyun Cho +Li Yao Li Yao +Li Yao Li Yao +Li Yao yaoli +Li Yao Li +Dmitrii Serdiuk dima +Dmitrii Serdiuk dmitriy-serdyuk +Dmitrii Serdiuk serdyuk +Francesco Visin Francesco +Francesco Visin fvisin +Sebastien Jean sebastien +Sebastien Jean sebastien-j +Sebastien Jean sebastien-j +Chienli Ma Chienli Ma(马千里) +Chienli Ma ChienliMa +Ziye Fan FanZiye(t13m) +Iban Harlouchet Iban Harlouchet +Caglar Caglar +Alexandre de Brebisson AdeB +Roy Xue Lijun Xue +Bart van Merrienboer Bart van Merriënboer +Kelvin Xu kelvinxu +Kelvin Xu Kelvin Xu +Kelvin Xu Kelvin Xu +Kelvin Xu Kelvin Xu +Kelvin Xu Kelvin Xu +Kelvin Xu Kelvin Xu +Kelvin Xu Kelvin Xu +Kelvin Xu Kelvin Xu +Kelvin Xu Kelvin Xu +jojolalpin jojolalpin +Mehdi Mirza Mehdi Mirza +Mehdi Mirza memimo +Andre Holzner Andre Holzner +Andre Holzner andreh +Moslem Kazemi Moslem Kazemi +Moslem Kazemi Mo +Alex Lamb AlexLamb +Alex Lamb DeathMonster666 +Lucas Beyer lucasb-eyer +Iulian Vlad Serban Iulian Vlad Serban +Iulian Vlad Serban Iulian Vlad Serban +Mathieu Germain Mathieu Germain +abalkin abalkin +abalkin abalkin +abalkin Alexander Belopolsky +John Schulman joschu +Xavier Bouthillier Xavier Bouthillier +Xavier Bouthillier Xavier Bouthillier/ diff --git a/.travis.yml b/.travis.yml index 0399254..836be8c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,14 +23,26 @@ before_install: - export PATH=/home/travis/miniconda2/bin:$PATH - conda update --yes conda +addons: + apt_packages: + - texlive-latex-recommended + - texlive-latex-extra + - texlive-fonts-recommended + - dvipng + install: - - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then conda create --yes -q -n pyenv mkl python=2.6 numpy=1.7.1 scipy=0.11 nose=1.3.0 pyparsing=1.5 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1; fi - - if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda create --yes -q -n pyenv mkl python=3.3 numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pyparsing=1.5 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1; fi + - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then conda create --yes -q -n pyenv mkl python=2.6 numpy=1.7.1 scipy=0.11 nose=1.3.0 pyparsing=1.5 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx; fi + - if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda create --yes -q -n pyenv mkl python=3.3 numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pyparsing=1.5 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx; fi - source activate pyenv - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install pydot; fi - pip install . --no-deps # command to run tests +env: + - PART="theano/tests/test_flake8.py" DOC=1 + - PART="-e test_flake8.py theano/compat theano/compile theano/d3viz theano/gof theano/misc theano/sandbox theano/scalar theano/scan_module theano/sparse theano/tests theano/typed_list" + - PART="theano/tensor" + matrix: fast_finish: true include: @@ -39,11 +51,6 @@ matrix: - python: "2.6" env: PART="." THEANO_FLAGS="mode=FAST_COMPILE,floatX=float32" -env: - - PART="sandbox sparse scalar tensor/nnet scan_module" - - PART="tensor/tests/test_basic.py tensor/signal compile gof misc tests compat" - - PART="-e test_basic.py tensor/tests" - script: - export THEANO_FLAGS=$THEANO_FLAGS,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,gcc.cxxflags=-pipe - python --version @@ -56,12 +63,11 @@ script: # Move to the path of the installed version - cd $(python -c 'import theano; import os; print(os.path.split(theano.__file__)[0])') - echo "$PART" + - cd -; cd Theano + - python -c 'import theano; print(theano.config)' - theano-nose -v $PART -# - theano-cache list + - if [[ $DOC == "1" ]]; then python doc/scripts/docgen.py --nopdf --check; fi + - if [[ $DOC == "1" ]]; then python doc/scripts/docgen.py --test --check; fi -#after_script: after_failure: - cat /home/travis/.pip/pip.log -#after_success: - -cache: apt diff --git a/HISTORY.txt b/HISTORY.txt index a59fba7..33f3d13 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -5,6 +5,20 @@ Old Release Notes ================= +Theano 0.7 (26th of March, 2015) +================================ +We recommand to everyone to upgrade to this version. + +Highlights: + * Integration of CuDNN for 2D convolutions and pooling on supported GPUs + * Too many optimizations and new features to count + * Various fixes and improvements to scan + * Better support for GPU on Windows + * On Mac OS X, clang is used by default + * Many crash fixes + * Some bug fixes as well + + Theano 0.6 (December 3th, 2013) =================================== diff --git a/NEWS.txt b/NEWS.txt index 35bab52..c6b8cc4 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -2,15 +2,250 @@ Release Notes ============= -Theano 0.7 (26th of March, 2015) -================================ -We recommand to everyone to upgrade to this version. +Theano 0.8 rc1 (29th of February, 2016) +======================================= + +We recommend that everybody update to this version. Highlights: - * Integration of CuDNN for 2D convolutions and pooling on supported GPUs - * Too many optimizations and new features to count - * Various fixes and improvements to scan - * Better support for GPU on Windows - * On Mac OS X, clang is used by default - * Many crash fixes - * Some bug fixes as well +- Python 2 and 3 support with the same code base +- Faster optimization +- New GPU back-end: + + * Float16 new back-end (need cuda 7.5) + * Multi dtypes + * Multi-GPU support in the same process + +- Integration of CuDNN for better GPU performance +- Many Scan improvements (execution speed up, ...) +- optimizer=fast_compile moves computation to the GPU. +- Better convolution on CPU and GPU. (CorrMM, cudnn, 3d conv, more parameter) +- Interactive visualization of graphs with d3viz +- cnmem (better memory management on GPU) +- BreakpointOp +- Multi-GPU for data parallism via Platoon (https://github.com/mila-udem/platoon/) + + +A total of 135 people contributed to this release, see the list at the bottom. + + +Installation: +- Better blas detection +- Fixes for more recent software and OS versions +- Support Anaconda on Windows + +Bug fixes: +- GpuJoin now supports negative axis +- Fix GpuCumsum for negative axis + +Interface Deprecation (a warning is printed): +- Deprecate Param class, use In instead + +Interface Changes: +- Rename DownsampleFactorMax to Pool. +- tensor.stack now uses the same interface as numpy.stack +- optimizer=fast_compile moves computation to the GPU +- Raise the user stack trace more frequently. +- Change dev version numbering to follow the PEP 440 + + +New Interface (reuses existing functionality): +- theano.tensor.nnet.relu +- theano.tensor.nnet.elu +- BatchNormalization. +- MaxAndArgmax support axis=None +- Add theano.tensor.compress (equivalent of numpy.compress) +- theano.tensor.signal.downsamples.max_pool_2d_same_size +- COp +- __props__ + +New features +- tensor.unique +- map_variables +- erfcx +- mgrid, ogrid +- allclose +- BreakpointOp +- Make bincount work on GPU +- SolveOp on GPU +- Optional optimization remove_all_assert +- AllocEmpty +- LogSoftmax, for stability optimization when the crossentropy optimization does not apply. +- theano.tensor.repeat works on GPU +- BatchedDot on the GPU and faster on the CPU. +- Faster batched_tensordot and make it work on GPU. +- SoftmaxGrad grad +- 3d conv via CorrMM on the GPU +- CPU Max Pool support of padding and strides!=windows size +- theano.function() now accepts a dict for the outputs. When doing this, the function will return a dict. Helpful to keep track of which output is what. +- Warn for unknown or misspelled theano config variables +- theano.tensor.tile update (accept symbolic reps, work on GPU) +- scan how have a strict flag. If set to True, this make scan building faster and could make execution faster. +- theano.tensor.signal.conv2d(2d,2d) output 2d answer + + +Speed-ups: +- Faster SetSubtensor on the GPU. +- Support more reduction pattern on the GPU. +- More graph optimization +- Faster graph optimization +- GpuCrossentropySoftmaxArgmax1HotWithBias + + +Crash/no return fixes: +- Fix crash in the assert op grad +- Fix curand crash on Mac +- Multiple Fix scan crashes +- Finish to update all Op.grad() implementation to the new interface + +Others: +- Support ARM processor. +- Better tests +- Code clean up. +- Doc updates +- doctest and sphinx test in travis +- More tests tagged as slow +- Better same_shape implementation +- More op with c code to lower overhead +- Custom pickler for SharedVariable theano.misc.pkl_utils.{dump,load} +- function_dump to help us reproduce user error during compilation +- assert_no_cpu_op +- pep8, flake8 +- Better error messages +- On non-default modes, reduce the number of allocation when allow_gc=False +- Better lock + + +Committers for this dev version only: +- Frederic Bastien +- Arnaud Bergeron +- Pierre Luc Carrier +- Iban Harlouchet +- Pascal Lamblin +- Chienli Ma +- David Warde-Farley +- Amjad Almahairi +- Tim Cooijmans +- Christof Angermueller +- Nicolas Ballas +- Ziye Fan +- Caglar +- Sina Honari +- Roy Xue +- hantek +- Mohammad Pezeshki +- Melanie Ducoffe +- Alexandre de Brebisson +- Harm de Vries +- Alex Lamb +- Ramana.S +- Saizheng Zhang +- Francesco Visin +- Ying Zhang +- Bart van Merrienboer +- Cesar Laurent +- Jan Schlüter +- Xavier Bouthillier +- Iulian Vlad Serban +- Samira Shabanian +- Sigurd Spieckermann +- Dmitrii Serdiuk +- Kelvin Xu +- Li Yao +- Sebastien Jean +- Thomas Mesnard +- Seon-Wook Park +- Dustin Webb +- Mikhail Korobov +- orhanf +- Daniel Renshaw +- Julien Rebetez +- Sean Lee +- TimSalimans +- Andre Holzner +- Gijs van Tulder +- Guillaume Alain +- Julien Demouth +- Markus Beissinger +- Mehdi Mirza +- Moslem Kazemi +- Saxenauts +- skaae +- Anatoly Belikov +- Diogo Moitinho de Almeida +- Kashif Rasul +- Laurent Dinh +- Rémy Léone +- gw0 [http://gw.tnode.com/] +- mronian +- vesis84 +- Benni +- JesseLivezey +- Marius Killinger +- Matt Graham +- Matthew Willson +- Piotr Frankowski +- Stefan Krastanov +- vdumoulin +- Luke Metz +- Anish Shah +- Balázs Hidasi +- Colin Raffel +- Cory Lorenz +- Doug +- Jesse Livezey +- John Salvatier +- John Zedlewski +- Jonathan Ho +- Kaixhin +- Liang-Chi Hsieh +- Lucas Beyer +- Marc-Alexandre Cote +- Martin Arjovsky +- Matthias Kümmerer +- Sirisha Rambhatla +- Vincent Michalski +- briancheung +- ivdorelian +- jan-matthis +- jojolalpin +- joncrall +- peterjsadowski +- scottsievert +- Étienne Simon +- A. Flaxman +- AlOa +- Albert Zeyer +- Andrea +- Andy Jiang +- Balázs +- Ben Poole +- Brian Cheung +- Christophe Van Gysel +- Claude Coulombe +- Clay McLeod +- Dario Garcia +- Jakob Lombacher +- Jakub Sygnowski +- Joao Felipe Santos +- John Arevalo +- Jonas Degrave +- Martin Thoma +- Mathieu Germain +- Matthew Koichi Grimes +- Michael Eickenberg +- Michael Opitz +- Paul Hollensen +- Prayag Verma +- Saatvik Shah +- Sergei Lebedev +- Vik Kamath +- Wei Ouyang +- Yi-Lin Juang +- Yurii Shevchuk +- Zach Dwiel +- dan +- eulerreich +- jotterbach +- rolf +- wuaalb diff --git a/NEWS_DEV.txt b/NEWS_DEV.txt index 0709d7e..762055f 100644 --- a/NEWS_DEV.txt +++ b/NEWS_DEV.txt @@ -1,20 +1,13 @@ -.. _NEWS: +.. _NEWS_DEV: =================== DRAFT Release Notes =================== -git log -p rel-0.6rc3... |grep Merge|grep '#' |cut -f 8 -d ' ' | replace "#" "* https://github.com/Theano/Theano/pull/" +git log -p rel-0.7... |grep Merge|grep '#[0123456789]' |cut -f 8 -d ' ' | sed 's\#\* https://github.com/Theano/Theano/pull/\' -git shortlog -sn rel-0.6rc3.. +git shortlog -sn rel-0.7.. -Done up to PR 1608 -* https://github.com/Theano/Theano/pull/1608 - -* https://github.com/Theano/Theano/pull/1591 # need info - -Interface change: - - theano.tensor.signal.conv2d(2d,2d) output 2d answer. (Frederic B., reported by Alexander Izvorski) Theano Development version @@ -22,32 +15,3 @@ Theano Development version NEWS.txt: -We recommend that everybody update to this version. - -Highlights: - - -Committers for this dev version only: - - -A total of X people contributed to this release. -People with a "+" by their names contributed a patch for the first time. - -Installation: - -Bug fixes: - -Interface Deprecation (a warning is printed): - -Interface Changes: - -New Interface (reuses existing functionality): - -Speed-ups: - -Crash/no return fixes: - -Others: - -Todo for the final release: - * update the NEWS.txt file. diff --git a/README.txt b/README.txt index 3244a55..0e133b9 100644 --- a/README.txt +++ b/README.txt @@ -2,7 +2,6 @@ To install the package, see this page: http://deeplearning.net/software/theano/install.html - For the documentation, see the project website: http://deeplearning.net/software/theano/ @@ -14,7 +13,7 @@ Related Projects: We recommend you look at the documentation on the website, since it will be more current than the documentation included with the package. If you really wish to build the documentation yourself, you will need -epydoc and sphinx. Issue the following command: +sphinx. Issue the following command: python ./doc/scripts/docgen.py diff --git a/bin/theano-cache b/bin/theano-cache index c5ba55c..a5cfdfb 100755 --- a/bin/theano-cache +++ b/bin/theano-cache @@ -6,6 +6,7 @@ import sys import theano from theano import config +import theano.gof.compiledir from theano.gof.cc import get_module_cache _logger = logging.getLogger('theano.bin.theano-cache') diff --git a/doc/LICENSE.txt b/doc/LICENSE.txt index 75dc806..e5d0a24 100644 --- a/doc/LICENSE.txt +++ b/doc/LICENSE.txt @@ -3,7 +3,7 @@ LICENSE ======= -Copyright (c) 2008--2015, Theano Development Team +Copyright (c) 2008--2016, Theano Development Team All rights reserved. Contains code from NumPy, Copyright (c) 2005-2011, NumPy Developers. diff --git a/doc/api/epydoc.conf b/doc/api/epydoc.conf deleted file mode 100644 index f894921..0000000 --- a/doc/api/epydoc.conf +++ /dev/null @@ -1,152 +0,0 @@ -# TODO: -# Get all graphs to work! - - -[epydoc] # Epydoc section marker (required by ConfigParser) - -# The list of objects to document. Objects can be named using -# dotted names, module filenames, or package directory names. -# Alases for this option include "objects" and "values". -modules: theano scipy.sparse - -# The type of output that should be generated. Should be one -# of: html, text, latex, dvi, ps, pdf. -output: html - -# An integer indicating how verbose epydoc should be. The default -# value is 0; negative values will supress warnings and errors; -# positive values will give more verbose output. -verbosity: 1 - -# A boolean value indicating that Epydoc should show a tracaback -# in case of unexpected error. By default don't show tracebacks -debug: 1 - -# If True, don't try to use colors or cursor control when doing -# textual output. The default False assumes a rich text prompt -simple-term: 0 - - -### Generation options - -# The default markup language for docstrings, for modules that do -# not define __docformat__. Defaults to epytext. -docformat: epytext - -# Whether or not parsing should be used to examine objects. -parse: yes - -# Whether or not introspection should be used to examine objects. -introspect: yes - -# Don't examine in any way the modules whose dotted name match this -# regular expression pattern. -#exclude - -# Don't perform introspection on the modules whose dotted name match this -# regular expression pattern. -#exclude-introspect - -# Don't perform parsing on the modules whose dotted name match this -# regular expression pattern. -#exclude-parse - -# The format for showing inheritance objects. -# It should be one of: 'grouped', 'listed', 'included'. -inheritance: grouped - -# Whether or not to inclue private variables. (Even if included, -# private variables will be hidden by default.) -private: yes - -# Whether or not to list each module's imports. -imports: yes - -# Whether or not to include syntax highlighted source code in -# the output (HTML only). -sourcecode: yes - -# Whether or not to includea a page with Epydoc log, containing -# effective option at the time of generation and the reported logs. -include-log: yes - - -### Output options - -# The documented project's name. -name: Theano - -# The CSS stylesheet for HTML output. Can be the name of a builtin -# stylesheet, or the name of a file. -css: white - -# The documented project's URL. -url: http://lgcm.iro.umontreal.ca/theano/ - -# HTML code for the project link in the navigation bar. If left -# unspecified, the project link will be generated based on the -# project's name and URL. -#link: My Cool Project - -# The "top" page for the documentation. Can be a URL, the name -# of a module or class, or one of the special names "trees.html", -# "indices.html", or "help.html" -#top: os.path - -# An alternative help file. The named file should contain the -# body of an HTML file; navigation bars will be added to it. -#help: my_helpfile.html - -# Whether or not to include a frames-based table of contents. -#frames: yes -frames: no - -# Whether each class should be listed in its own section when -# generating LaTeX or PDF output. -separate-classes: no - - -### API linking options - -# Define a new API document. A new interpreted text role -# will be created -#external-api: epydoc - -# Use the records in this file to resolve objects in the API named NAME. -#external-api-file: epydoc:api-objects.txt - -# Use this URL prefix to configure the string returned for external API. -#external-api-root: epydoc:http://epydoc.sourceforge.net/api -# external-api: wiki doc -# external-api-root: wiki:http://lgcm.iro.umontreal.ca/theano/wiki/ doc:http://lgcm.iro.umontreal.ca/auto_theano/doc/ -# external-api-file: wiki:wiki.idx doc:doc/doc.idx - -### Graph options - -# The list of graph types that should be automatically included -# in the output. Graphs are generated using the Graphviz "dot" -# executable. Graph types include: "classtree", "callgraph", -# "umlclass". Use "all" to include all graph types -graph: all - -# The path to the Graphviz "dot" executable, used to generate -# graphs. -dotpath: /usr/bin/dot - -# The name of one or more pstat files (generated by the profile -# or hotshot module). These are used to generate call graphs. -#pstat: autotest.pstat - -# Specify the font used to generate Graphviz graphs. -# (e.g., helvetica or times). -graph-font: Helvetica - -# Specify the font size used to generate Graphviz graphs. -graph-font-size: 10 - - -### Return value options - -# The condition upon which Epydoc should exit with a non-zero -# exit status. Possible values are error, warning, docstring_warning -#fail-on: error diff --git a/doc/cifarSC2011/advanced_theano.txt b/doc/cifarSC2011/advanced_theano.txt index 780f8cb..0d1d382 100644 --- a/doc/cifarSC2011/advanced_theano.txt +++ b/doc/cifarSC2011/advanced_theano.txt @@ -41,14 +41,14 @@ Conditions n_times = 10 tic = time.clock() - for i in xrange(n_times): + for i in range(n_times): f_switch(val1, val2, big_mat1, big_mat2) - print 'time spent evaluating both values %f sec'%(time.clock()-tic) + print('time spent evaluating both values %f sec' % (time.clock()-tic)) tic = time.clock() - for i in xrange(n_times): + for i in range(n_times): f_lazyifelse(val1, val2, big_mat1, big_mat2) - print 'time spent evaluating one value %f sec'%(time.clock()-tic) + print('time spent evaluating one value %f sec' % (time.clock()-tic)) .. testoutput:: :hide: @@ -123,6 +123,7 @@ Loops .. testcode:: + import numpy import theano import theano.tensor as T @@ -141,7 +142,7 @@ Loops outputs=polynomial) test_coeff = numpy.asarray([1, 0, 2], dtype=numpy.float32) - print calculate_polynomial(test_coeff, 3) + print(calculate_polynomial(test_coeff, 3)) .. testoutput:: @@ -179,96 +180,200 @@ Inplace optimization Profiling --------- -- To replace the default mode with this mode, use the Theano flags ``mode=ProfileMode`` +- To replace the default mode with this mode, use the Theano flags ``profile=True`` -- To enable the memory profiling use the flags ``ProfileMode.profile_memory=True`` +- To enable the memory profiling use the flags ``profile=True,profile_memory=True`` -Theano output: +Theano output for running the train function of logistic regression +example from :doc:`here <../tutorial/examples>` for one epoch: .. code-block:: python """ - Time since import 33.456s - Theano compile time: 1.023s (3.1% since import) - Optimization time: 0.789s - Linker time: 0.221s - Theano fct call 30.878s (92.3% since import) - Theano Op time 29.411s 87.9%(since import) 95.3%(of fct call) - Theano function overhead in ProfileMode 1.466s 4.4%(since import) - 4.7%(of fct call) - 10001 Theano fct call, 0.003s per call - Rest of the time since import 1.555s 4.6% - - Theano fct summary: - <% total fct time>