Theano-rel-0.9.0/000077500000000000000000000000001306376074600135325ustar00rootroot00000000000000Theano-rel-0.9.0/.jenkins/000077500000000000000000000000001306376074600152515ustar00rootroot00000000000000Theano-rel-0.9.0/.jenkins/jenkins_buildbot_nogpp.sh000077500000000000000000000036551306376074600223510ustar00rootroot00000000000000#!/bin/bash # Anaconda python export PATH=/usr/local/miniconda2/bin:$PATH BUILDBOT_DIR=$WORKSPACE/nightly_build THEANO_PARAM="theano --with-timer --timer-top-n 10" # nosetests xunit for test profiling XUNIT="--with-xunit --xunit-file=" # name test suites SUITE="--xunit-testsuite-name=" mkdir -p ${BUILDBOT_DIR} ls -l ${BUILDBOT_DIR} echo "Directory of stdout/stderr ${BUILDBOT_DIR}" echo echo BASE_COMPILEDIR=$WORKSPACE/compile/theano_compile_dir_theano_nogpp ROOT_CWD=$WORKSPACE/nightly_build FLAGS=base_compiledir=$BASE_COMPILEDIR COMPILEDIR=`THEANO_FLAGS=$FLAGS python -c "from __future__ import print_function; import theano; print(theano.config.compiledir)"` NOSETESTS=bin/theano-nose export PYTHONPATH=${WORKSPACE}:$PYTHONPATH echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l # We don't want warnings in the buildbot for errors already fixed. FLAGS=${THEANO_FLAGS},warn.argmax_pushdown_bug=False,warn.gpusum_01_011_0111_bug=False,warn.sum_sum_bug=False,warn.sum_div_dimshuffle_bug=False,warn.subtensor_merge_bug=False,$FLAGS # We want to see correctly optimization/shape errors, so make make them raise an # error. FLAGS=on_opt_error=raise,$FLAGS FLAGS=on_shape_error=raise,$FLAGS # Ignore user device and floatX config, because: # 1. Tests are intended to be run with device=cpu. # 2. We explicitly add 'floatX=float32' in one run of the test suite below, # while we want all other runs to run with 'floatX=float64'. FLAGS=${FLAGS},device=cpu,floatX=float64 echo "Executing tests with mode=FAST_RUN" NAME=fastrun FILE=${ROOT_CWD}/theano_${NAME}_tests.xml echo "THEANO_FLAGS=cmodule.warn_no_version=True,${FLAGS},mode=FAST_RUN ${NOSETESTS} ${PROFILING} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}" date THEANO_FLAGS=cmodule.warn_no_version=True,${FLAGS},mode=FAST_RUN ${NOSETESTS} ${PROFILING} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME} echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l echo Theano-rel-0.9.0/.jenkins/jenkins_buildbot_python2.sh000077500000000000000000000072121306376074600226220ustar00rootroot00000000000000#!/bin/bash BUILDBOT_DIR=$WORKSPACE/nightly_build THEANO_PARAM="theano --with-timer --timer-top-n 10" export THEANO_FLAGS=init_gpu_device=gpu # CUDA export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH # nosetests xunit for test profiling XUNIT="--with-xunit --xunit-file=" # name test suites SUITE="--xunit-testsuite-name=" mkdir -p ${BUILDBOT_DIR} ls -l ${BUILDBOT_DIR} echo "Directory of stdout/stderr ${BUILDBOT_DIR}" echo echo BASE_COMPILEDIR=$WORKSPACE/compile/theano_compile_dir_theano_python2 ROOT_CWD=$WORKSPACE/nightly_build FLAGS=base_compiledir=$BASE_COMPILEDIR COMPILEDIR=`THEANO_FLAGS=$FLAGS python -c "from __future__ import print_function; import theano; print(theano.config.compiledir)"` NOSETESTS=bin/theano-nose export PYTHONPATH=${WORKSPACE}:$PYTHONPATH echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l # We don't want warnings in the buildbot for errors already fixed. FLAGS=${THEANO_FLAGS},warn.argmax_pushdown_bug=False,warn.gpusum_01_011_0111_bug=False,warn.sum_sum_bug=False,warn.sum_div_dimshuffle_bug=False,warn.subtensor_merge_bug=False,$FLAGS # We want to see correctly optimization/shape errors, so make make them raise an # error. FLAGS=on_opt_error=raise,$FLAGS FLAGS=on_shape_error=raise,$FLAGS # Ignore user device and floatX config, because: # 1. Tests are intended to be run with device=cpu. # 2. We explicitly add 'floatX=float32' in one run of the test suite below, # while we want all other runs to run with 'floatX=float64'. FLAGS=${FLAGS},device=cpu,floatX=float64 echo "Executing tests with mode=FAST_RUN" NAME=fastrun FILE=${ROOT_CWD}/theano_${NAME}_tests.xml echo "THEANO_FLAGS=cmodule.warn_no_version=True,${FLAGS},mode=FAST_RUN ${NOSETESTS} ${PROFILING} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}" date THEANO_FLAGS=cmodule.warn_no_version=True,${FLAGS},mode=FAST_RUN ${NOSETESTS} ${PROFILING} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME} echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l echo echo "Executing tests with mode=FAST_RUN,floatX=float32" NAME=fastrun_float32 FILE=${ROOT_CWD}/theano_${NAME}_tests.xml echo "THEANO_FLAGS=${FLAGS},mode=FAST_RUN,floatX=float32 ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}" date THEANO_FLAGS=${FLAGS},mode=FAST_RUN,floatX=float32 ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME} echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l echo echo "Executing tests with linker=vm,vm.lazy=True,floatX=float32" NAME=fastrun_float32_lazyvm FILE=${ROOT_CWD}/theano_${NAME}_tests.xml echo "THEANO_FLAGS=${FLAGS},linker=vm,vm.lazy=True,floatX=float32 ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}" date THEANO_FLAGS=${FLAGS},linker=vm,vm.lazy=True,floatX=float32 ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME} echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l echo #We put this at the end as it have a tendency to loop infinitly. #Until we fix the root of the problem we let the rest run, then we can kill this one in the morning. # with --batch=1000" # The buildbot freeze sometimes when collecting the tests to run echo "Executing tests with mode=FAST_COMPILE" NAME=fastcompile FILE=${ROOT_CWD}/theano_${NAME}_tests.xml echo "THEANO_FLAGS=${FLAGS},mode=FAST_COMPILE ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}" date THEANO_FLAGS=${FLAGS},mode=FAST_COMPILE ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME} echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l echo Theano-rel-0.9.0/.jenkins/jenkins_buildbot_python2_32bit.sh000077500000000000000000000011511306376074600236210ustar00rootroot00000000000000#!/bin/bash BUILDBOT_DIR=$WORKSPACE/nightly_build THEANO_PARAM="theano --with-timer --timer-top-n 10" # Set test reports using nosetests xunit XUNIT="--with-xunit --xunit-file=" mkdir -p ${BUILDBOT_DIR} ls -l ${BUILDBOT_DIR} echo "Directory of stdout/stderr ${BUILDBOT_DIR}" echo echo FILE=${BUILDBOT_DIR}/theano_python32bit_tests.xml set -x PYTHONPATH=$HOME/anaconda2_32bit/lib/python2.7/site-packages THEANO_FLAGS=device=cpu,force_device=true,lib.amdlibm=False,compiledir=$WORKSPACE/compile/theano_compile_dir_theano_python2_32bit $HOME/anaconda2_32bit/bin/python bin/theano-nose ${THEANO_PARAM} ${XUNIT}${FILE} Theano-rel-0.9.0/.jenkins/jenkins_buildbot_python2_debug.sh000077500000000000000000000045371306376074600237770ustar00rootroot00000000000000#!/bin/bash BUILDBOT_DIR=$WORKSPACE/nightly_build THEANO_PARAM="theano --with-timer --timer-top-n 10" export THEANO_FLAGS=init_gpu_device=gpu # CUDA export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH # nosetests xunit for test profiling XUNIT="--with-xunit --xunit-file=" mkdir -p ${BUILDBOT_DIR} ls -l ${BUILDBOT_DIR} echo "Directory of stdout/stderr ${BUILDBOT_DIR}" echo echo BASE_COMPILEDIR=$WORKSPACE/compile/theano_compile_dir_theano_python2 ROOT_CWD=$WORKSPACE/nightly_build FLAGS=base_compiledir=$BASE_COMPILEDIR COMPILEDIR=`THEANO_FLAGS=$FLAGS python -c "from __future__ import print_function; import theano; print(theano.config.compiledir)"` NOSETESTS=bin/theano-nose export PYTHONPATH=${WORKSPACE}:$PYTHONPATH echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l # We don't want warnings in the buildbot for errors already fixed. FLAGS=${THEANO_FLAGS},warn.argmax_pushdown_bug=False,warn.gpusum_01_011_0111_bug=False,warn.sum_sum_bug=False,warn.sum_div_dimshuffle_bug=False,warn.subtensor_merge_bug=False,$FLAGS # We want to see correctly optimization/shape errors, so make make them raise an # error. FLAGS=on_opt_error=raise,$FLAGS FLAGS=on_shape_error=raise,$FLAGS # Ignore user device and floatX config, because: # 1. Tests are intended to be run with device=cpu. # 2. We explicitly add 'floatX=float32' in one run of the test suite below, # while we want all other runs to run with 'floatX=float64'. FLAGS=${FLAGS},device=cpu,floatX=float64 #we change the seed and record it everyday to test different combination. We record it to be able to reproduce bug caused by different seed. We don't want multiple test in DEBUG_MODE each day as this take too long. seed=$RANDOM echo "Executing tests with mode=DEBUG_MODE with seed of the day $seed" FILE=${ROOT_CWD}/theano_debug_tests.xml echo "THEANO_FLAGS=${FLAGS},unittests.rseed=$seed,mode=DEBUG_MODE,DebugMode.check_strides=0,DebugMode.patience=3,DebugMode.check_preallocated_output= ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE}" date THEANO_FLAGS=${FLAGS},unittests.rseed=$seed,mode=DEBUG_MODE,DebugMode.check_strides=0,DebugMode.patience=3,DebugMode.check_preallocated_output= ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l echo Theano-rel-0.9.0/.jenkins/jenkins_buildbot_python3.sh000077500000000000000000000014251306376074600226230ustar00rootroot00000000000000#!/bin/bash BUILDBOT_DIR=$WORKSPACE/nightly_build THEANO_PARAM="theano --with-timer --timer-top-n 10" # Set test reports using nosetests xunit XUNIT="--with-xunit --xunit-file=" export THEANO_FLAGS=init_gpu_device=gpu # CUDA export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH mkdir -p ${BUILDBOT_DIR} ls -l ${BUILDBOT_DIR} echo "Directory of stdout/stderr ${BUILDBOT_DIR}" echo echo FILE=${BUILDBOT_DIR}/theano_python3_tests.xml set -x PYTHONPATH= THEANO_FLAGS=$THEANO_FLAGS,compiledir=$WORKSPACE/compile/theano_compile_dir_theano_python3,mode=FAST_COMPILE,warn.ignore_bug_before=0.5,on_opt_error=raise,on_shape_error=raise python3 bin/theano-nose ${THEANO_PARAM} ${XUNIT}${FILE} Theano-rel-0.9.0/.jenkins/jenkins_buildbot_release_extra.sh000077500000000000000000000063521306376074600240460ustar00rootroot00000000000000#!/bin/bash BUILDBOT_DIR=$WORKSPACE/nightly_build THEANO_PARAM="theano --with-timer --timer-top-n 10" export THEANO_FLAGS=init_gpu_device=gpu # CUDA export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH # nosetests xunit for test profiling XUNIT="--with-xunit --xunit-file=" # name test suites SUITE="--xunit-testsuite-name=" mkdir -p ${BUILDBOT_DIR} ls -l ${BUILDBOT_DIR} echo "Directory of stdout/stderr ${BUILDBOT_DIR}" echo echo BASE_COMPILEDIR=$WORKSPACE/compile/theano_compile_dir_theano_release ROOT_CWD=$WORKSPACE/nightly_build FLAGS=base_compiledir=$BASE_COMPILEDIR COMPILEDIR=`THEANO_FLAGS=$FLAGS python -c "from __future__ import print_function; import theano; print(theano.config.compiledir)"` NOSETESTS=bin/theano-nose export PYTHONPATH=${WORKSPACE}:$PYTHONPATH echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l # We don't want warnings in the buildbot for errors already fixed. FLAGS=${THEANO_FLAGS},warn.argmax_pushdown_bug=False,warn.gpusum_01_011_0111_bug=False,warn.sum_sum_bug=False,warn.sum_div_dimshuffle_bug=False,warn.subtensor_merge_bug=False,$FLAGS # We want to see correctly optimization/shape errors, so make make them raise an # error. FLAGS=on_opt_error=raise,$FLAGS FLAGS=on_shape_error=raise,$FLAGS # Ignore user device and floatX config, because: # 1. Tests are intended to be run with device=cpu. # 2. We explicitly add 'floatX=float32' in one run of the test suite below, # while we want all other runs to run with 'floatX=float64'. FLAGS=${FLAGS},device=cpu,floatX=float64 echo "Executing tests with compute_test_value=ignore" NAME=compute_test_value_ignore FILE=${ROOT_CWD}/theano_${NAME}_tests.xml echo "THEANO_FLAGS=${FLAGS},compute_test_value=ignore ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}" date THEANO_FLAGS=${FLAGS},compute_test_value=ignore ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME} echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l echo echo "Executing tests with linker=vm,floatX=float32" NAME=linker_vm_float32 FILE=${ROOT_CWD}/theano_${NAME}_tests.xml echo "THEANO_FLAGS=${FLAGS},linker=vm,floatX=float32 ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}" date THEANO_FLAGS=${FLAGS},linker=vm,floatX=float32 ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME} echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l echo echo "Executing tests with cxx=" NAME=cxx_none FILE=${ROOT_CWD}/theano_${NAME}_tests.xml echo "THEANO_FLAGS=${FLAGS},cxx= ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}" date THEANO_FLAGS=${FLAGS},cxx= ${NOSETESTS} ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME} echo "Number of elements in the compiledir:" ls ${COMPILEDIR}|wc -l echo # Test shortcut to default test suite echo "Running tests using theano.test()" mkdir -p test_default rm -rf test_default/* cd test_default NAME=import FILE=${ROOT_CWD}/theano_${NAME}_tests.xml EXTRA_ARGS='["--with-xunit", "--xunit-file='${FILE}$'", "'${SUITE}${NAME}'"]' THEANO_FLAGS=base_compiledir=$BASE_COMPILEDIR python -c "import theano; theano.test(extra_argv=${EXTRA_ARGS})" Theano-rel-0.9.0/.jenkins/jenkins_pretest.sh000077500000000000000000000010371306376074600210200ustar00rootroot00000000000000#!/bin/bash # Script for Jenkins continuous integration pre-testing # Print commands as they are executed set -x # Anaconda python export PATH=/usr/local/miniconda2/bin:$PATH # Test flake8 echo "===== Testing flake8" bin/theano-nose theano/tests/test_flake8.py --with-xunit --xunit-file=theano_pre_tests.xml || exit 1 # Test documentation echo "===== Testing documentation build" python doc/scripts/docgen.py --nopdf --check || exit 1 echo "===== Testing documentation code snippets" python doc/scripts/docgen.py --test --check || exit 1 Theano-rel-0.9.0/.jenkins/jenkins_test1.sh000077500000000000000000000010341306376074600203670ustar00rootroot00000000000000#!/bin/bash # Script for Jenkins continuous integration testing of theano base # Print commands as they are executed set -x # Anaconda python export PATH=/usr/local/miniconda2/bin:$PATH echo "===== Testing theano core" # Test theano core PARTS="theano -e cuda -e gpuarray" THEANO_PARAM="${PARTS} --with-timer --timer-top-n 10 --with-xunit --xunit-file=theanocore_tests.xml" FLAGS="mode=FAST_RUN,floatX=float32,on_opt_error=raise,on_shape_error=raise,cmodule.age_thresh_use=604800" THEANO_FLAGS=${FLAGS} bin/theano-nose ${THEANO_PARAM} Theano-rel-0.9.0/.jenkins/jenkins_test2.sh000077500000000000000000000066101306376074600203750ustar00rootroot00000000000000#!/bin/bash # Script for Jenkins continuous integration testing of gpu backends # Print commands as they are executed set -x # Anaconda python export PATH=/usr/local/miniconda2/bin:$PATH # CUDA export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH echo "===== Testing old theano.sandbox.cuda backend" THEANO_CUDA_TESTS="theano/sandbox/cuda/tests \ theano/misc/tests/test_pycuda_example.py \ theano/misc/tests/test_pycuda_theano_simple.py \ theano/misc/tests/test_pycuda_utils.py \ theano/tensor/tests/test_opt.py:TestCompositeCodegen \ theano/tensor/tests/test_opt.py:test_shapeoptimizer \ theano/tensor/tests/test_opt.py:test_fusion \ theano/compile/tests/test_debugmode.py:Test_preallocated_output \ theano/sparse/tests/test_basic.py:DotTests \ theano/sandbox/tests/test_multinomial.py:test_gpu_opt \ theano/sandbox/tests/test_rng_mrg.py:test_consistency_GPU_serial \ theano/sandbox/tests/test_rng_mrg.py:test_consistency_GPU_parallel \ theano/sandbox/tests/test_rng_mrg.py:test_GPU_nstreams_limit \ theano/sandbox/tests/test_rng_mrg.py:test_overflow_gpu_old_backend \ theano/scan_module/tests/test_scan.py:T_Scan_Cuda" THEANO_PARAM="${THEANO_CUDA_TESTS} --with-timer --timer-top-n 10 --with-xunit --xunit-file=theanocuda_tests.xml" FLAGS="mode=FAST_RUN,init_gpu_device=gpu,floatX=float32" THEANO_FLAGS=${FLAGS} bin/theano-nose ${THEANO_PARAM} echo "===== Testing gpuarray backend" GPUARRAY_CONFIG="Release" DEVICE=cuda0 LIBDIR=${WORKSPACE}/local # Make fresh clones of libgpuarray (with no history since we don't need it) rm -rf libgpuarray git clone --depth 1 "https://github.com/Theano/libgpuarray.git" # Clean up previous installs (to make sure no old files are left) rm -rf $LIBDIR mkdir $LIBDIR # Build libgpuarray mkdir libgpuarray/build (cd libgpuarray/build && cmake .. -DCMAKE_BUILD_TYPE=${GPUARRAY_CONFIG} -DCMAKE_INSTALL_PREFIX=$LIBDIR && make) # Finally install (cd libgpuarray/build && make install) # Export paths export CPATH=$CPATH:$LIBDIR/include export LIBRARY_PATH=$LIBRARY_PATH:$LIBDIR/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR/lib # Build the pygpu modules (cd libgpuarray && python setup.py build_ext --inplace -I$LIBDIR/include -L$LIBDIR/lib) ls $LIBDIR mkdir $LIBDIR/lib/python export PYTHONPATH=${PYTHONPATH}:$LIBDIR/lib/python # Then install (cd libgpuarray && python setup.py install --home=$LIBDIR) python -c 'import pygpu; print(pygpu.__file__)' # Testing theano (the gpuarray parts) THEANO_GPUARRAY_TESTS="theano/gpuarray/tests \ theano/sandbox/tests/test_rng_mrg.py:test_consistency_GPUA_serial \ theano/sandbox/tests/test_rng_mrg.py:test_consistency_GPUA_parallel \ theano/sandbox/tests/test_rng_mrg.py:test_GPUA_full_fill \ theano/scan_module/tests/test_scan.py:T_Scan_Gpuarray \ theano/scan_module/tests/test_scan_checkpoints.py:TestScanCheckpoint.test_memory" FLAGS="init_gpu_device=$DEVICE,gpuarray.preallocate=1000,mode=FAST_RUN,on_opt_error=raise,on_shape_error=raise,cmodule.age_thresh_use=604800" THEANO_FLAGS=${FLAGS} time nosetests --with-xunit --xunit-file=theanogpuarray_tests.xml ${THEANO_GPUARRAY_TESTS} Theano-rel-0.9.0/.mailmap000066400000000000000000000430071306376074600151570ustar00rootroot00000000000000# Prevent git from showing duplicate names with commands like "git shortlog" # # See the manpage of git-shortlog for details. # # The syntax is: # # Name that should be used Bad name # # # # You can skip Bad name if it is the same as the one that should be used, and is unique. # # # # This file is up-to-date if the command git log --format="%aN <%aE>" | sort -u # # gives no duplicates. # 5 Firstname Lastname # 4 Laboratoire d'Informatique des Systemes Adaptatifs # 25 projects@lgcm abalkin abalkin abalkin abalkin abalkin Alexander Belopolsky abalkin Alexander Belopolsky Alex Lamb AlexLamb Alex Lamb DeathMonster666 Alexandre de Brebisson AdeB Alexandre de Brebisson Alexandre de Brébisson Anatoly Belikov Anatoly Belikov Andre Holzner Andre Holzner Andre Holzner andreh Andre Holzner Andre Holzner Arjun Jain Arjun Jain Arnaud Bergeron Balázs Hidasi Balázs Bart van Merrienboer Bart van Merriënboer Bart van Merrienboer Bart Benjamin Scellier Benjamin Scellier Benjamin Scellier Benjamin Scellier Benjamin Scellier Benjamin Scellier Benjamin Scellier Benjamin Scellier Benjamin Scellier Benjamin Scellier Benjamin Scellier bscellier Bogdan Budescu bbudescu Brian Cheung briancheung Caglar Caglar Cesar Laurent César Laurent Chienli Ma Chienli Ma(马千里) Chienli Ma ChienliMa Chiheb Trabelsi Chiheb Trabelsi Chinnadhurai Sankar Chinnadhurai Sankar Chinnadhurai Sankar Chinnadhurai Sankar Chinnadhurai Sankar Chinnadhurai Sankar Chinnadhurai Sankar Chinnadhurai Sankar Chinnadhurai Sankar chinnadhurai Claude Coulombe Claude Coulombe 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 Dmitrii Serdiuk dima Dmitrii Serdiuk dmitriy-serdyuk Dmitrii Serdiuk serdyuk Dumitru Erhan dumitru@deepnets.mtv.corp.google.com Dumitru Erhan erhandum@bikat.iro.umontreal.ca Dzmitry Bahdanau rizar Eric Hunsberger hunse Ethan Buchman ebuchman Evelyn Mitchell evelynmitchell Faruk Ahmed Faruk Ahmed Faruk Ahmed Faruk Ahmed Faruk Ahmed Faruk Ahmed Fei Wang fay Francesco Visin Francesco Francesco Visin fvisin Francois Savard fsavard Frederic Bastien Frederic Bastien Frederic Bastien Frederic Bastien Frederic Bastien Frédéric Bastien Frederic Bastien Nouiz Frederic Bastien Nouiz Frederic Bastien bastienf@bikat.iro.umontreal.ca Frederic Bastien bastienf@ldapk3.scinet.utoronto.ca Frederic Bastien nouiz Frederic Bastien Frederic Frederic Bastien Frédéric Bastien Frederic Bastien theano-bot Gennadiy Tupitsin genichyar Gokula Krishnan Gokul Grégoire Mesnil Grégoire Grégoire Mesnil Grégoire Guillaume Alain Guillaume Alain Guillaume Desjardins desjagui Guillaume Desjardins desjagui@atchoum.iro.umontreal.ca Guillaume Desjardins desjagui@opale.iro.umontreal.ca Guillaume Desjardins gdesjardins Guillaume Desjardins tutorial/debug_faq.txt Hani Almousli Hani Hani Almousli HaniAlmousli Huy Nguyen huyng Ian Goodfellow Ian Goodfellow Ian Goodfellow goodfeli Ian Goodfellow Ian Goodfellow Ian Goodfellow Ian Goodfellow Iban Harlouchet Iban Harlouchet Iulian Vlad Serban Iulian Vlad Serban Iulian Vlad Serban Iulian Vlad Serban Jakub Sygnowski Jakub Sygnowski James Bergstra James Bergstra James Bergstra bergstra@ip05.m James Bergstra bergstra@mlp4.ais.sandbox James Bergstra bergstra@tikuanyin James Bergstra bergstrj@iro.umontreal.ca James Bergstra bergstrj@lgcm James Bergstra james@X40 James Bergstra james@crane James Bergstra james@mackie James Bergstra james@x40.unstable James Bergstra test_rng_mrg.py Jan Schlüter f0k Jeremiah Lowin Jeremiah Lowin Jeremiah Lowin Jeremiah Lowin Jeremie Tanguay Tanjay94 Jeremie Tanguay Jeremie Tanguay Jesse Livezey JesseLivezey John Salvatier jsalvatier John Salvatier john salvatier John Schulman joschu jojolalpin jojolalpin Joseph Turian Joseph Turian Joseph Turian turian@grenat.iro.umontreal.ca Joseph Turian turian@lgcm Joseph Turian turian@lsvm.iro.umontreal.ca Joseph Turian turian@rubis.iro.umontreal.ca Joseph Turian turianjo@is23.m Josh Bleecher Snyder Josh Bleecher Snyder Jörg Bornschein Joerg Bornschein Karthik Karanth medakk Kelvin Xu Kelvin Xu 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 Kv Manohar kvmanohar22 Kyung Hyun Cho Kyunghyun Cho Kyung Hyun Cho Kyunghyun Cho Li Yao Li Yao Li Yao Li Yao Li Yao yaoli Li Yao Li Liwei Cai cai-lw Lucas Beyer lucasb-eyer Ludwig Schmidt-Hackenberg Ludwig Schmidt-Hackenberg Luke Metz = Markus Roth Markus Roth Mathieu Germain Mathieu Germain Mehdi Mirza Mehdi Mirza Mehdi Mirza memimo Moslem Kazemi Moslem Kazemi Moslem Kazemi Mo Nan Rosemary Ke nke001 Nicolas Ballas Kcub Nicolas Ballas ballasn Nicolas Boulanger-Lewandowski boulanni Nicolas Pinto Nicolas Pinto Olivier Breuleux Olivier Breuleux Olivier Breuleux olivier@olivier-desktop Olivier Breuleux olivier@ordinateur-de-olivier.local Olivier Delalleau Olivier Delalleau Olivier Delalleau delallea Olivier Delalleau delallea@valhalla.apstat.com Orhan Firat orhanf Pascal Lamblin lamblin Pascal Lamblin lamblinp@lgcm Philippe Hamel Philippe Hamel Philippe Hamel Philippe Hamel Pierre-Antoine Manzagol Pierre-Antoine Manzagol 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 Ramana Subramanyam sentient07 Ramana Subramanyam Ramana.S Rami Al-Rfou' Rami Al-Rfou Raul Chandias Ferrari chandiar Razvan Pascanu Razvan Pascanu Razvan Pascanu Razvan Pascanu Razvan Pascanu Razvan Pascanu Razvan Pascanu pascanur@simplet.iro.umontreal.ca Razvan Pascanu rman@rpad Roy Xue Lijun Xue Ruslana Makovetsky ruslanagit Sander Dieleman benanne Sebastian Berg seberg Sebastien Jean sebastien Sebastien Jean sebastien-j Sebastien Jean sebastien-j Simon Lefrancois slefrancois Simon Lefrancois Simon Lefrancois Sina Honari SinaHonari Sina Honari Sina Honari Søren Kaae Sønderby skaae Steven Bocco notoraptor Steven Bocco notoraptor Steven Pigeon steven-pigeon Thomas George Thomas George Valentin Bisson onze Xavier Bouthillier Xavier Bouthillier Xavier Bouthillier Xavier Bouthillier/ Xavier Glorot glorotxa Xavier Glorot glorotxa@timide.iro.umontreal.ca Vincent Dumoulin vdumoulin Vitaliy Kurlin yobibyte Vivek Kulkarni Vivek Kulkarni Wei Li kuantkid Yoshua Bengio bengioy@bengio-mac.local Ziye Fan FanZiye(t13m) Zhouhan LIN hantek Zhouhan LIN Zhouhan LIN Theano-rel-0.9.0/.travis.yml000066400000000000000000000063301306376074600156450ustar00rootroot00000000000000# After changing this file, check it on: # http://lint.travis-ci.org/ sudo: false cache: directories: - $HOME/.cache/pip - $HOME/.theano - $HOME/download # Sufficient to add miniconda.sh to TRAVIS cache. - $HOME/miniconda2 # Add the installation to TRAVIS cache. language: python python: - "2.7" - "3.3" # NB: # In before_install and install sections below, # some codes have been moved to separate files # to better handle if-else shell syntax # for multiple lines. New files are in # new folder ".travis". # command to install dependencies before_install: - ./.travis/travis_before_install.sh - export PATH=/home/travis/miniconda2/bin:$PATH addons: apt_packages: - texlive-latex-recommended - texlive-latex-extra - texlive-fonts-recommended - dvipng install: - ./.travis/travis_install.sh - source activate pyenv - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install pydot; else pip install pydot-ng; fi - pip install . --no-deps --upgrade - pip install flake8-future-import nose-parameterized==0.5.0 sphinx_rtd_theme # nose-exclude plugin allow us to tell nosetests to exclude folder with --exclude-dir=path/to/directory. - pip install nose-exclude # 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 -e test_basic.py --exclude-dir=theano/tensor/nnet" - PART="theano/tensor/tests/test_basic.py" - PART="theano/tensor/nnet -e test_abstract_conv.py" - PART="theano/tensor/nnet/tests/test_abstract_conv.py" matrix: fast_finish: true include: - python: "3.3" env: PART="--exclude-dir=theano/tensor -e test_flake8.py ." THEANO_FLAGS="mode=FAST_COMPILE" - python: "3.3" env: PART="theano/tensor --exclude-dir=theano/tensor/nnet" THEANO_FLAGS="mode=FAST_COMPILE" - python: "3.3" env: PART="theano/tensor/nnet" THEANO_FLAGS="mode=FAST_COMPILE" - python: "2.7" env: PART="--exclude-dir=theano/tensor -e test_flake8.py ." THEANO_FLAGS="mode=FAST_COMPILE,floatX=float32" - python: "2.7" env: PART="theano/tensor --exclude-dir=theano/tensor/nnet" THEANO_FLAGS="mode=FAST_COMPILE,floatX=float32" - python: "2.7" env: PART="theano/tensor/nnet" THEANO_FLAGS="mode=FAST_COMPILE,floatX=float32" script: - export THEANO_FLAGS=$THEANO_FLAGS,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,gcc.cxxflags=-pipe - python --version - uname -a - free -m - df -h - ulimit -a # Move out of Theano so the import will use the installed version - cd .. # 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.__str__(print_doc=False))' - python -c 'import theano; assert(theano.config.blas.ldflags != "")' - theano-nose -v $PART - 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_failure: - cat /home/travis/.pip/pip.log Theano-rel-0.9.0/.travis/000077500000000000000000000000001306376074600151205ustar00rootroot00000000000000Theano-rel-0.9.0/.travis/travis_before_install.sh000077500000000000000000000010111306376074600220300ustar00rootroot00000000000000#!/usr/bin/env bash # Install miniconda to avoid compiling scipy if test -e $HOME/miniconda2/bin ; then echo "miniconda already installed." else echo "Installing miniconda." rm -rf $HOME/miniconda2 mkdir -p $HOME/download if [[ -d $HOME/download/miniconda.sh ]] ; then rm -rf $HOME/download/miniconda.sh ; fi wget -c https://repo.continuum.io/miniconda/Miniconda2-4.1.11-Linux-x86_64.sh -O $HOME/download/miniconda.sh chmod +x $HOME/download/miniconda.sh $HOME/download/miniconda.sh -b fi Theano-rel-0.9.0/.travis/travis_install.sh000077500000000000000000000015311306376074600205150ustar00rootroot00000000000000#!/usr/bin/env bash # In Python 3.3, we test the min version of NumPy and SciPy. In Python 2.7, we test more recent version. if test -e $HOME/miniconda2/envs/pyenv; then echo "pyenv already exists." else echo "Creating pyenv." if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda create --yes -q -n pyenv python=2.7 ; fi if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda create --yes -q -n pyenv python=3.3 ; fi fi source activate pyenv if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda install --yes -q mkl numpy=1.9.1 scipy=0.14.0 nose=1.3.0 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service libgfortran=1; fi if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda install --yes -q mkl numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service; fi source deactivate Theano-rel-0.9.0/CONTRIBUTING.md000066400000000000000000000002101306376074600157540ustar00rootroot00000000000000If you want to contribute to Theano, have a look at the instructions here: http://deeplearning.net/software/theano/dev_start_guide.html Theano-rel-0.9.0/DESCRIPTION.txt000066400000000000000000000021621306376074600160570ustar00rootroot00000000000000Theano is a Python library that allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays. It is built on top of NumPy_. Theano features: * **tight integration with NumPy:** a similar interface to NumPy's. numpy.ndarrays are also used internally in Theano-compiled functions. * **transparent use of a GPU:** perform data-intensive computations up to 140x faster than on a CPU (support for float32 only). * **efficient symbolic differentiation:** Theano can compute derivatives for functions of one or many inputs. * **speed and stability optimizations:** avoid nasty bugs when computing expressions such as log(1 + exp(x)) for large values of x. * **dynamic C code generation:** evaluate expressions faster. * **extensive unit-testing and self-verification:** includes tools for detecting and diagnosing bugs and/or potential problems. Theano has been powering large-scale computationally intensive scientific research since 2007, but it is also approachable enough to be used in the classroom (IFT6266 at the University of Montreal). .. _NumPy: http://numpy.scipy.org/ Theano-rel-0.9.0/EMAIL.txt000066400000000000000000000070771306376074600151350ustar00rootroot00000000000000=========================== Announcing Theano 0.5 =========================== ## You can select and adapt one of the following templates. ## Basic text for major version release: This is a release for a major version, with lots of new features, bug fixes, and some interface changes (deprecated or potentially misleading features were removed). Upgrading to Theano 0.5 is recommended for everyone, but you should first make sure that your code does not raise deprecation warnings with Theano 0.4.1. Otherwise, in one case the results can change. In other cases, the warnings are turned into errors (see below for details). For those using the bleeding edge version in the git repository, we encourage you to update to the `0.5` tag. ## Basic text for major version release candidate: This is a release candidate for a major version, with lots of new features, bug fixes, and some interface changes (deprecated or potentially misleading features were removed). The upgrade is recommended for developers who want to help test and report bugs, or want to use new features now. If you have updated to 0.5rc1, you are highly encouraged to update to 0.5rc2. For those using the bleeding edge version in the git repository, we encourage you to update to the `0.5rc2` tag. ## Basic text for minor version release: TODO ## Basic text for minor version release candidate: TODO What's New ---------- [Include the content of NEWS.txt here] Download and Install -------------------- You can download Theano from http://pypi.python.org/pypi/Theano Installation instructions are available at http://deeplearning.net/software/theano/install.html Description ----------- Theano is a Python library that allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays. It is built on top of NumPy. Theano features: * tight integration with NumPy: a similar interface to NumPy's. numpy.ndarrays are also used internally in Theano-compiled functions. * transparent use of a GPU: perform data-intensive computations up to 140x faster than on a CPU (support for float32 only). * efficient symbolic differentiation: Theano can compute derivatives for functions of one or many inputs. * speed and stability optimizations: avoid nasty bugs when computing expressions such as log(1+ exp(x)) for large values of x. * dynamic C code generation: evaluate expressions faster. * extensive unit-testing and self-verification: includes tools for detecting and diagnosing bugs and/or potential problems. Theano has been powering large-scale computationally intensive scientific research since 2007, but it is also approachable enough to be used in the classroom (IFT6266 at the University of Montreal). Resources --------- About Theano: http://deeplearning.net/software/theano/ Theano-related projects: http://github.com/Theano/Theano/wiki/Related-projects About NumPy: http://numpy.scipy.org/ About SciPy: http://www.scipy.org/ Machine Learning Tutorial with Theano on Deep Architectures: http://deeplearning.net/tutorial/ Acknowledgments --------------- I would like to thank all contributors of Theano. For this particular release, many people have helped, notably (in alphabetical order): [Generate the list of commiters: git shortlog -s ...| cut -c8-] I would also like to thank users who submitted bug reports, notably: [TODO] Also, thank you to all NumPy and Scipy developers as Theano builds on their strengths. All questions/comments are always welcome on the Theano mailing-lists ( http://deeplearning.net/software/theano/#community ) Theano-rel-0.9.0/HISTORY.txt000066400000000000000000003345241306376074600154470ustar00rootroot00000000000000 .. _HISTORY: ================= Old Release Notes ================= Theano 0.9.0rc4 (13th of March, 2017) ===================================== This release extends the 0.9.0rc3 and announces the upcoming final release 0.9. Highlights (since 0.9.0rc3): - Documentation updates - DebugMode fixes, cache cleanup fixes and other small fixes - New GPU back-end: - Fixed offset error in GpuIncSubtensor - Fixed indexing error in GpuAdvancedSubtensor for more than 2 dimensions A total of 5 people contributed to this release since 0.9.0rc3 and 123 since 0.8.0, see the lists below. Committers since 0.9.0rc3: - Frederic Bastien - Pascal Lamblin - Arnaud Bergeron - Cesar Laurent - Martin Drawitsch Theano 0.9.0rc3 (6th of March, 2017) ==================================== This release extends the 0.9.0rc2 and announces the upcoming final release 0.9. Highlights (since 0.9.0rc2): - Graph clean up and faster compilation - New Theano flag conv.assert_shape to check user-provided shapes at runtime (for debugging) - Fix overflow in pooling - Warn if taking softmax over broadcastable dimension - Removed old files not used anymore - Test fixes and crash fixes - New GPU back-end: - Removed warp-synchronous programming, to get good results with newer CUDA drivers A total of 5 people contributed to this release since 0.9.0rc2 and 122 since 0.8.0, see the lists below. Committers since 0.9.0rc2: - Frederic Bastien - Arnaud Bergeron - Pascal Lamblin - Florian Bordes - Jan Schlüter Theano 0.9.0rc2 (27th of February, 2017) ======================================== This release extends the 0.9.0rc1 and announces the upcoming final release 0.9. Highlights (since 0.9.0rc1): - Fixed dnn conv grad issues - Allowed pooling of empty batch - Use of 64-bit indexing in sparse ops to allow matrix with more then 2\ :sup:`31`\ -1 elements. - Removed old benchmark directory - Crash fixes, bug fixes, warnings improvements, and documentation update A total of 9 people contributed to this release since 0.9.0rc1 and 121 since 0.8.0, see the lists below. Committers since 0.9.0rc1: - Frederic Bastien - Pascal Lamblin - Steven Bocco - Simon Lefrancois - Lucas Beyer - Michael Harradon - Rebecca N. Palmer - David Bau - Micah Bojrab Theano 0.9.0rc1 (20th of February, 2017) ======================================== This release extends the 0.9.0beta1 and announces the upcoming final release 0.9. Highlights (since 0.9.0beta1): - Better integration of Theano+libgpuarray packages into conda distribution - Better handling of Windows end-lines into C codes - Better compatibility with NumPy 1.12 - Faster scan optimizations - Fixed broadcast checking in scan - Bug fixes related to merge optimizer and shape inference - many other bug fixes and improvements - Updated documentation - New GPU back-end: - Value of a shared variable is now set inplace A total of 26 people contributed to this release since 0.9.0beta1 and 117 since 0.8.0, see the list at the bottom. Interface changes: - In MRG, replaced method `multinomial_wo_replacement()` with new method `choice()` Convolution updates: - Implement conv2d_transpose convenience function GPU: - GPUMultinomialFromUniform op now supports multiple dtypes New features: - OpFromGraph now allows gradient overriding for every input - Added Abstract Ops for batch normalization that use cuDNN when available and pure Theano CPU/GPU alternatives otherwise - Added new Theano flag cuda.enabled - Added new Theano flag print_global_stats to print some global statistics (time spent) at the end Others: - Split op now has C code for CPU and GPU - "theano-cache list" now includes compilation times Committers since 0.9.0beta1: - Frederic Bastien - Benjamin Scellier - khaotik - Steven Bocco - Arnaud Bergeron - Pascal Lamblin - Gijs van Tulder - Reyhane Askari - Chinnadhurai Sankar - Vincent Dumoulin - Alexander Matyasko - Cesar Laurent - Nicolas Ballas - affanv14 - Faruk Ahmed - Anton Chechetka - Alexandre de Brebisson - Amjad Almahairi - Dimitar Dimitrov - Fuchai - Jan Schlüter - Jonas Degrave - Mathieu Germain - Rebecca N. Palmer - Simon Lefrancois - valtron Theano 0.9.0beta1 (24th of January, 2017) ========================================= This release contains a lot of bug fixes and improvements + new features, to prepare the upcoming release candidate. Highlights: - Many computation and compilation speed up - More numerical stability by default for some graph - Jenkins (gpu tests run on PR in addition to daily buildbot) - Better handling of corner cases for theano functions and graph optimizations - More graph optimization (faster execution and smaller graph, so more readable) - Less c code compilation - Better Python 3.5 support - Better numpy 1.12 support - Support newer Mac and Windows version - Conda packages for Mac, Linux and Windows - Theano scripts now works on Windows - scan with checkpoint (trade off between speed and memory usage, useful for long sequences) - Added a bool dtype - New GPU back-end: - float16 storage - better mapping between theano device number and nvidia-smi number, using the PCI bus ID of graphic cards - More pooling support on GPU when cuDNN isn't there - ignore_border=False is now implemented for pooling A total of 111 people contributed to this release since 0.8.0, see the list at the bottom. Interface changes: - New pooling interface - Pooling parameters can change at run time - When converting empty list/tuple, now we use floatX dtype - The MRG random generator now try to infer the broadcast pattern of its output - Move softsign out of sandbox to theano.tensor.nnet.softsign - Roll make the shift be modulo the size of the axis we roll on - Merge CumsumOp/CumprodOp into CumOp - round() default to the same as NumPy: half_to_even Convolution updates: - Multi-cores convolution and pooling on CPU - New abstract 3d convolution interface similar to the 2d convolution interface - Dilated convolution GPU: - cuDNN: support versoin 5.1 and wrap batch normalization (2d and 3d) and RNN functions - Multiple-GPU, synchrone update (via platoon, use NCCL) - GpuAdvancedSubtensor in new back-end - Gemv(matrix-vector product) speed up for special shape - Support for MaxAndArgMax for some axis combination - Support for solve (using cusolver), erfinv and erfcinv - cublas gemv workaround when we reduce on an axis with a dimensions size of 0 - Warn user that some cuDNN algorithms may produce unexpected results in certain environments for convolution backward filter operations New features: - Add gradient of solve, tensorinv (CPU), tensorsolve (CPU) searchsorted (CPU) - Add Multinomial Without Replacement - conv3d2d support full and half mode (REMOVE?) - Add DownsampleFactorMaxGradGrad.grad - Allow partial evaluation of compiled function - More Rop support - Indexing support ellipsis: a[..., 3], a[1,...,3] - Added theano.tensor.{tensor5,dtensor5, ...} - compiledir_format support device - Added new Theano flag cmodule.age_thresh_use Others: - Speed up argmax only on gpu (without also needing the max) - A few unfrequent bugfix - More stack trace in error message - Speed up cholesky grad - log(sum(exp(...))) now get stability optimized Other more detailed changes: - Allow more then one output to be an destructive inplace - Add flag profiling.ignore_first_call, useful to profile the new gpu back-end - Doc/error message fixes/updates - More support of negative axis - Added the keepdims parameter to the norm function - Crash fixes - Make scan gradient more deterministic - Add support for space in path on Windows - remove ProfileMode (use Theano flag profile=True instead) Committers since 0.8.0: - Frederic Bastien - Arnaud Bergeron - Pascal Lamblin - Ramana Subramanyam - Simon Lefrancois - Steven Bocco - Gijs van Tulder - Cesar Laurent - Chiheb Trabelsi - Chinnadhurai Sankar - Mohammad Pezeshki - Reyhane Askari - Alexander Matyasko - Alexandre de Brebisson - Nan Rosemary Ke - Pierre Luc Carrier - Mathieu Germain - Olivier Mastropietro - khaotik - Saizheng Zhang - Thomas George - Iulian Vlad Serban - Benjamin Scellier - Francesco Visin - Caglar - Harm de Vries - Samira Shabanian - Jakub Sygnowski - Samira Ebrahimi Kahou - Mikhail Korobov - Faruk Ahmed - Fei Wang - Jan Schlüter - Kv Manohar - Jesse Livezey - Kelvin Xu - Matt Graham - Ruslana Makovetsky - Sina Honari - Bryn Keller - Ciyong Chen - Nicolas Ballas - Vitaliy Kurlin - Zhouhan LIN - Gokula Krishnan - Kumar Krishna Agrawal - Ozan Çağlayan - Vincent Michalski - Ray Donnelly - Tim Cooijmans - Vincent Dumoulin - happygds - mockingjamie - Amjad Almahairi - Christos Tsirigotis - Ilya Kulikov - RadhikaG - Taesup (TS) Kim - Ying Zhang - Karthik Karanth - Kirill Bobyrev - Yang Zhang - Yaroslav Ganin - Liwei Cai - Morgan Stuart - Tim Gasper - Xavier Bouthillier - p - texot - Andrés Gottlieb - Ben Poole - Bhavishya Pohani - Carl Thomé - Evelyn Mitchell - Fei Zhan - Fábio Perez - Gennadiy Tupitsin - Gilles Louppe - Greg Ciccarelli - He - Huan Zhang - Jonas Degrave - Kaixhin - Kevin Keraudren - Maltimore - Marc-Alexandre Cote - Marco - Marius F. Killinger - Maxim Kochurov - Neil - Nizar Assaf - Rithesh Kumar - Rizky Luthfianto - Robin Millette - Roman Ring - Sander Dieleman - Sebastin Santy - Shawn Tan - Wazeer Zulfikar - Wojciech Głogowski - Yann N. Dauphin - gw0 [http://gw.tnode.com/] - hexahedria - hsintone - jakirkham - joncrall - root - superantichrist - tillahoffmann - wazeerzulfikar - you-n-g Theano 0.8.2 (21th of April, 2016) ================================== This is a point release with only the support for cudnn v5 convolution and minor fixes. Highlights: - cuDNN v5 convolution support (cuDNN v3 isn't supported anymore) - A few crash fixes Theano 0.8.1 (29th of March, 2016) ================================== This is a point release without any new feature. It fixes compilation issues on MacOS X with the command line tools for XCode 7.3, which was released shortly after Theano 0.8.0. Theano 0.8 (21th of March, 2016) ================================ We recommend that everybody update to this version. Highlights: - Python 2 and 3 support with the same code base - Faster optimization - 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/) - More pooling parameter supported - Bilinear interpolation of images - New GPU back-end: * Float16 new back-end (need cuda 7.5) * Multi dtypes * Multi-GPU support in the same process A total of 141 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 - More convolution parameter supported - Bilinear interpolation of images 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 - Tim Cooijmans - Nicolas Ballas - Amjad Almahairi - David Warde-Farley - Christof Angermueller - Ziye Fan - Caglar - Sina Honari - Roy Xue - hantek - Mohammad Pezeshki - Melanie Ducoffe - Alexandre de Brebisson - Harm de Vries - Samira Shabanian - Alex Lamb - Ramana.S - Francesco Visin - Saizheng Zhang - Ying Zhang - Jan Schlüter - Xavier Bouthillier - Bart van Merrienboer - Cesar Laurent - Iulian Vlad Serban - Li Yao - Sigurd Spieckermann - Dmitrii Serdiuk - Kelvin Xu - Sebastien Jean - Thomas Mesnard - Seon-Wook Park - Vincent Michalski - Dustin Webb - Mikhail Korobov - Orhan Firat - Olivier Mastropietro - Daniel Renshaw - Julien Rebetez - Peng Liu - Sean Lee - TimSalimans - Andre Holzner - Gijs van Tulder - Guillaume Alain - Julien Demouth - Markus Beissinger - Mehdi Mirza - Moslem Kazemi - Saxenauts - Søren Kaae Sønderby - sentient07 - Anatoly Belikov - Diogo Moitinho de Almeida - Jakub Sygnowski - Kashif Rasul - Laurent Dinh - Rémy Léone - Taesup (TS) Kim - gw0 [http://gw.tnode.com/] - mronian - vesis84 - Benni - Chiheb Trabelsi - JesseLivezey - Marius Killinger - Matt Graham - Matthew Willson - Piotr Frankowski - Stefan Krastanov - vdumoulin - Adithya Ganesh - Anish Shah - Balázs Hidasi - Colin Raffel - Cory Lorenz - Doug - Jesse Livezey - John Salvatier - John Zedlewski - Jonathan Ho - Kaixhin - Liang-Chi Hsieh - Lucas Beyer - Luke Metz - Marc-Alexandre Cote - Martin Arjovsky - Matthias Kümmerer - Sirisha Rambhatla - briancheung - cai-lw - 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 - 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 - Wojciech Głogowski - Yi-Lin Juang - Yurii Shevchuk - Zach Dwiel - dan - eulerreich - jotterbach - rolf - theaverageguy - wuaalb 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) =================================== We recommend that everybody update to this version. Highlights (since 0.6rc5): * Last release with support for Python 2.4 and 2.5. * We will try to release more frequently. * Fix crash/installation problems. * Use less memory for conv3d2d. 0.6rc4 skipped for a technical reason. Highlights (since 0.6rc3): * Python 3.3 compatibility with buildbot test for it. * Full advanced indexing support. * Better Windows 64 bit support. * New profiler. * Better error messages that help debugging. * Better support for newer NumPy versions (remove useless warning/crash). * Faster optimization/compilation for big graph. * Move in Theano the Conv3d2d implementation. * Better SymPy/Theano bridge: Make an Theano op from SymPy expression and use SymPy c code generator. * Bug fixes. Change from 0.6rc5: * Fix crash when specifing march in cxxflags Theano flag. (Frederic B., reported by FiReTiTi) * code cleanup (Jorg Bornschein) * Fix Canopy installation on windows when it was installed for all users: Raingo * Fix Theano tests due to a scipy change. (Frederic B.) * Work around bug introduced in scipy dev 0.14. (Frederic B.) * Fix Theano tests following bugfix in SciPy. (Frederic B., reported by Ziyuan Lin) * Add Theano flag cublas.lib (Misha Denil) * Make conv3d2d work more inplace (so less memory usage) (Frederic B., repoted by Jean-Philippe Ouellet) Committers since 0.5: Frederic Bastien Pascal Lamblin Ian Goodfellow Olivier Delalleau Razvan Pascanu abalkin Arnaud Bergeron Nicolas Bouchard + Jeremiah Lowin + Matthew Rocklin Eric Larsen + James Bergstra David Warde-Farley John Salvatier + Vivek Kulkarni + Yann N. Dauphin Ludwig Schmidt-Hackenberg + Gabe Schwartz + Rami Al-Rfou' + Guillaume Desjardins Caglar + Sigurd Spieckermann + Steven Pigeon + Bogdan Budescu + Jey Kottalam + Mehdi Mirza + Alexander Belopolsky + Ethan Buchman + Jason Yosinski Nicolas Pinto + Sina Honari + Ben McCann + Graham Taylor Hani Almousli Ilya Dyachenko + Jan Schlüter + Jorg Bornschein + Micky Latowicki + Yaroslav Halchenko + Eric Hunsberger + Amir Elaguizy + Hannes Schulz + Huy Nguyen + Ilan Schnell + Li Yao Misha Denil + Robert Kern + Sebastian Berg + Vincent Dumoulin + Wei Li + XterNalz + A total of 51 people contributed to this release. People with a "+" by their names contributed a patch for the first time. Theano 0.6rc5 (November 25th, 2013) =================================== We recommend that everybody update to this version. We plan to release 0.6 in one week if there is no problem introduced with this release candidate. Theano 0.6rc4 was skipped due to a problem with pypi Highlights: * Python 3.3 compatibility with buildbot test for it. * Full advanced indexing support. * Better Windows 64 bit support. * New profiler. * Better error messages that help debugging. * Better support for newer NumPy versions (remove useless warning/crash). * Faster optimization/compilation for big graph. * Move in Theano the Conv3d2d implementation. * Better SymPy/Theano bridge: Make an Theano op from SymPy expression and use SymPy c code generator. * Bug fixes. Committers for this rc5 only: Frederic Bastien Pascal Lamblin Arnaud Bergeron abalkin Olivier Delalleau John Salvatier Razvan Pascanu Jeremiah Lowin Ludwig Schmidt-Hackenberg + Vivek Kulkarni Matthew Rocklin Gabe Schwartz James Bergstra Sigurd Spieckermann + Bogdan Budescu + Mehdi Mirza + Nicolas Bouchard Ethan Buchman + Guillaume Desjardins Ian Goodfellow Jason Yosinski Sina Honari + Ben McCann + David Warde-Farley Ilya Dyachenko + Jan Schluter + Micky Latowicki + Yaroslav Halchenko + Alexander Belopolsky Hannes Schulz + Huy Nguyen + Robert Kern + Sebastian Berg + Vincent Dumoulin + Wei Li + XterNalz + A total of 36 people contributed to this release. People with a "+" by their names contributed a patch for the first time. Installation: * Canopy support (direct link to MKL): * On Linux and Mac OSX (Frederic B., Robert Kern) * On Windows (Edward Shi, Frederic B.) * Anaconda instructions (Pascal L., Frederic B.) * Doc Ubuntu 13.04 (Frederic B.) * Better support of newer NumPy version(remove useless warning/crash) (Frederic B., Huy Nguyen) Bug fixes: * Scan: if a scan node was cloned (by theano.clone) with different inputs, and if both the initial and the cloned nodes are used in the function being compiled, the value of the outputs of one would be replaced with the outputs of the other one. (Pascal L.) * Sparse: Disable the optimization that introduce the CSMGradC op as it doesn't work correctly with unsorted indices. (Frederic B.) * Mac: Fix wrong result of GpuDownsampleFactorMaxGrad on Mac OSX. (Pascal L.) * Mac: Auto-Detect and work around a bug in BLAS on MacOS X (Pascal L.) * Mac: Work around bug in MacOS X. If 2 compiled modules had the same name, the OS or Python was not always the right one even when we used the right handle to it. (Pascal L.) Use this hash in the Python module, and in %(nodename)s, so that different helper functions in the support code for different Ops will always have different names. * Sparse grad: Fix ConstructSparseFromList.infer_shape (Pascal L., reported by Rami Al-Rfou') * (introduced in the development version after 0.6rc3 release) (Frederic B.) Reduction that upcasts the input on no axis (ex: call theano.sum() on a scalar when the original dtype isn't float64 or [u]int64). It produced bad results as we did not upcasted the inputs in the code, we just copy them. * Fix some cases of theano.clone() when we get a replacement of x that is a function of x. (Razvan P., reported by Akio Takano) * Fix grad of Alloc when we unbroadcast the value and it isn't a scalar. (Frederic B., reported Ian G.) * In some cases (I think most cases), there was an exception raised in the theano.tensor.grad() method. But in theory, there could be bad shapes produced in the unbroadcasted dimensions. Interface Deprecation (a warning is printed): * The mode ProfileMode is now deprecated, use the Theano flag profile=True to replace it. * New theano.sparse_grad() interface to get the sparse grad of a_tensor[an_int_vector]. (Frederic B.) This can speed up the sparse computations when a small fraction of a_tensor is taken. Deprecate the old interface for this. (Frederic B.) Interface Changes: * Interface change subtensor and take are not in tensor.basic anymore. They were available from tensor.* and are still available from there. (Frederic B., Matthew Rocklin) * This lowers the basic.py size to 191k, so under 200k for github search. * Add -m32 or -m64 in the module cache key and add the python bitwidth in the compiledir path. (Pascal L.) * mrg.normal now has the parameter size mandatory. It was crashing with the default value of None. (Olivier D.) * Remove the deprecated passing of multiple modes to theano function. (Frederic B.) * Change FunctionGraph Features interface of the {on_prune(),on_import()} call back to take a reason. (Frederic B.) * FunctionGraph now clone the input graph by default. (Frederic B.) * Added a parameter to optionally not do this cloning. * This was needed to speed up compilation New Interface (reuses existing functionality): * Add hostname as a var in compiledir_format (Frederic B.) * Add a new Theano flag: compute_test_value_opt. It takes the same values as compute_test_value. It enables compute_test_value during Theano optimization. Only useful to debug Theano optimization. Also small changes to some optimization to work correctly in that setup. (Frederic B.) * Add the value pdb to the Theano flag: compute_test_value and compute_test_value_opt. (Frederic B.) * Add the Theano flag: optimizer_verbose. Default False. When True, we print all the optimization being applied.(Frederic B.) * Add Op.c_init_code() to allow running the code when the c cmodule is imported (Pascal L.) * Allow theano.tensor.ones(3) to support scalar and not just list of scalar as numpy.ones (Jeremiah Lowin) * Make the memory profiler print the FLOPS used for the ops that know how to compute it. (Frederic B.) New Features: * Make tensor.{constant,as_tensor_variable} work with memmap. (Christian Hudon, Frederic Bastien) * compilation work on ARM processor (Raspberry Pi, Vincent Dumoulin) * Add numpy.random.choice wrapper to our random number generator (Sigurd Spieckermann) * Better SymPy/Theano bridge: Make an Theano op from SymPy expression and use SymPy c code generator (Matthew Rocklin) * Move in Theano the Conv3d2d implementation (James Bergstra, Frederic B., Pascal L.) * First version of the new GPU back-end available (Arnaud Bergeron, Frederic B.) * Not all Ops have been converted to this new back-end. To use, use Theano flag device=cudaN or device=openclN, where N is a integer. * Python 3.3 compatible (abalkin, Gabe Schwartz, Frederic B., Pascal L.) * A new profiler (Frederic B.) The new profiler now can profile the memory with the Theano flag profile_memory=True. The ProfileMode now can't profile memory anymore and prints a message about it. Now we raise an error if we try to profile when the gpu is enabled if we didn't set correctly the env variable to force the driver to sync the kernel launch. Otherwise the profile information are useless. The new profiler supports the enabling/disabling of the garbage collection. * Adds tensor.tri, tensor.triu, and tensor.tril functions that wrap Numpy equivalents (Jeremiah Lowin) * Adds tensor.nonzero, tensor.flatnonzero functions that wrap Numpy equivalents (Jeremiah Lowin) * Adds tensor.nonzero_values to get around lack of advanced indexing for nonzero elements (Jeremiah Lowin) * Make {inc,set}_subtensor work on output of take. (Pascal L.) * When device=cpu and force_device=True, force that we disable the gpu. (Frederic B.) * Better Windows 64 bit support for indexing/reshaping (Pascal L.) * Full advanced indexing support (John Salvatier, seberg) * Add theano.tensor.stacklist(). Recursivly stack lists of tensors to maintain similar structure (Matthew R.) * Add Theano flag value: on_opt_error=pdb (Olivier D.) * GpuSoftmax[WithBias] for bigger row. (Frederic B.) * Make Erfinv work on the GPU (Guillaume Desjardin, Pascal L.) * Add "theano-cache basecompiledir purge" (Pascal L.) This purges all the compiledirs that are in the base compiledir. * A_tensor_variable.zeros_like() now supports the dtype parameter (Pascal L.) * More stable reduce operations by default (Pascal L.) Add an accumulator dtype to CAReduceDtype (acc_dtype) by default, acc_dtype is float64 for float32 inputs, then cast to specified output dtype (float32 for float32 inputs) * Test default blas flag before using it (Pascal L.) This makes it work correctly by default if no blas library is installed. * Add cuda.unuse() to help tests that need to enable/disable the GPU (Frederic B.) * Add theano.tensor.nnet.ultra_fast_sigmoid and the opt (disabled by default) local_ultra_fast_sigmoid. (Frederic B.) * Add theano.tensor.nnet.hard_sigmoid and the opt (disabled by default) local_hard_sigmoid. (Frederic B.) * Add class theano.compat.python2x.Counter() (Mehdi Mirza) * Allow a_cuda_ndarray += another_cuda_ndarray for 6d tensor. (Frederic B.) * Make the op ExtractDiag work on the GPU. (Frederic B.) * New op theano.tensor.chi2sf (Ethan Buchman) * Lift Flatten/Reshape toward input on unary elemwise. (Frederic B.) This makes the "log(1-sigmoid) -> softplus" stability optimization being applied with a flatten/reshape in the middle. * Make MonitorMode use the default optimizers config and allow it to change used optimizers (Frederic B.) * Add support for ScalarOp.c_support_code in GpuElemwise. (Frederic B.) * Also make the Psi function run on GPU. (Frederic B.) * Make tensor.outer(x,y) work when ndim != 1 as numpy.outer. * Kron op: Speed up/generalize/GPU friendly. (Frederic B.) (It is not an op anymore, but reuses current op) * Add gpu max for pattern (0, 1) and added all gpu max pattern for gpu min. (Frederic B.) * Add GpuEye (Frederic B.) * Make GpuCrossentropySoftmaxArgmax1HotWithBias and GpuCrossentropySoftmax1HotWithBiasDx work for bigger inputs (Frederic B., reported by Ryan Price) * Finish and move out of sandbox theano.sparse.basic.true_dot (Nicolas Bouchard, Frederic B.) And document all sparse dot variants. * Implement the mode ignore_borders for GpuImages2Neibs (Frederic B.) * Make many reduction functions accept a numpy scalar as axis (Jeremiah Lowin) * Allow numpy.asarray(cuda_ndarray, dtype=...) (Frederic B.) * theano-cache cleanup now remove cached module old version of code. (Frederic B.) Speed-ups: * Optimizer speed up. (Frederic B.) * Fix warning on newer llvm version on Mac. (Pascal L., reported by Jeremiah Lowin and Chris Fonnesbeck) * Allow pickling of more Ops to allow reusing the compiled code (Pascal L., Frederic B.) * Optimize more cases of dot22 and scalar when we can't make a gemm (Pascal L., Frederic B.) * Speed up GpuJoin with c code (Ludwig Schmidt-Hackenberg, Frederic B.) * Faster GpuAdvancedIncSubtensor1 on Fermi GPU (and up) on matrix. (Vivek Kulkarni) * Faster GPUAdvancedIncSubtensor1 in some cases on all GPU (Vivek Kulkarni) * Implemented c_code for AdvancedSubtensor1 (abalkin) * Add the equivalent of -march=native to g++ command line. (Frederic B., Pascal L.) * Speed up compilation with Scan (Jan Schluter) * Merge more Scan nodes together (Pascal L., Yao Li). * Add MakeVector.c_code (Frederic B.) * Add Shape.c_code (Frederic B.) * Optimize Elemwise when all the inputs are fortran (Frederic B.) We now generate a fortran output and use vectorisable code. * Add ScalarOp.c_code_contiguous interface and do a default version. (Frederic B.) This could optimize elemwise by helping the compiler generate SIMD instruction. * Use ScalarOp.c_code_contiguous with amdlibm. (Frederic B.) This speeds up exp, pow, sin, cos, log, log2, log10 and sigmoid when the input is contiguous in memory. * A fix that removes a local_setsubtensor_of_allocs optimization warning and enables it in that case. (Frederic B., reported by John Salvatier) * Make inv_as_solve optimization work (Matthew Rocklin) Crash/no return fixes: * Fix scan crash in the grad of grad of a scan with special structure (including scan in a scan) (Razvan P., Bitton Tenessi) * Fix various crashes when calling scan() with inputs specified in unusual ways. (Pascal L.) * Fix shape crash inserted by Scan optimization. The gradient of some recursive scan was making the PushOutSeqScan optimization insert crash during the execution of a Theano function. (Frederic B., reported by Hugo Larochelle) * Fix command not returning with recent mingw64 on Windows (Pascal L., reported by many people) * Fix infinite loop related to Scan on the GPU. (Pascal L.) * Fix infinite loop when the compiledir is full. (Frederic B.) * Fix a shape cycle crash in the optimizer (Pascal L., Frederic B., reported by Cho KyungHyun) * Fix MRG normal() now allow it to generate scalars. (Pascal L.) * Fix some GPU compilation issue on Mac (John Yani, Frederic B.) * Fix crash when building symbolic random variables with a mix of symbolic and numeric scalar in the "size" parameter. (Pascal L., Reported by Wu Zhen Zhou) * Make some Op.grad() implementions not return None (Pascal L.) * Crash fix in the grad of elemwise about an DisconnectedType (Pascal L, reported by Thomas Wiecki) * Fix local_gpu_multinomial optimization handling of broadcast information. (Frederic B., reported by Caglar) * Fix crash with change introduced in NumPy 1.7.1 (Pascal L., reported by Thomas Wiecki) * Compilation failure with complex (Pascal L., reported by autumncat) * Gpu reduction on all dimensions of a 4d tensor. (Frederic B., reported by Arjun Jain) * Fix crash for a combination of grad of dot and dimshuffle when only one of the inputs for a corresponding dimensions was knowing that it was broadcastable. (Frederic B., reported by Micky Latowicki) * AdvancedSubtensor1: allow broadcasted index vector. (Frederic B., reported by Jeremiah Lowin) * Fix compute_test_value for ifelse (Olivier D., reported by Bitton Tenessi) * Fix import error with some versions of NumPy (Olivier D.) * Fix Scan grad exception (Razvan P., reported by Nicolas BL) * Fix compute_test_value for a non_sequence when calling the gradient of Scan (Pascal L., reported by Bitton Tenessi). * Crash fix in Scan following interface change in 0.6rc2 (Razvan P.) * Crash fix on Scan (Razvan P.) * Crash fix on Scan (Pascal L., reported by Sina Honari and Sigurd) * Fix crash in Scan gradient related to compute_test_value (Frederic B., reported by Bitton Tenessi) * Fix a scan optimization warning/error depending of Theano flags (Frederic B.) * Fixed crash for unimplemented elemwise gradient (Olivier D., reported by Michael McNeil Forbes) * Fix crash in the elemwise python code for some big shape with power of 2. (Sina Honari, Pascal L.) * Fix compile and import errors on Windows including for the GPU. (Bogdan Budescu) * Fix GPU compilation on Windows (XterNalz) * Fix local_abs_merge optimization crash (Pascal L., reported by Jeremiah Lowin) * Fix import theano crash when g++ isn't there (Olivier D.) * Fix crash related to rebuild of Theano graph (Pascal L., reported by Divine Eguzouwa) * Fix crash during compilation (David Ward-Farley) * Crash fix in the grad of GPU op in corner case (Pascal L.) * Crash fix on MacOS X (Robert Kern) * theano.misc.gnumpy_utils.garray_to_cudandarray() set strides correctly for dimensions of 1. (Frederic B., reported by Justin Bayer) * Fix crash during optimization with consecutive sums and some combination of axis (Frederic B., reported by Caglar Gulcehre) * Fix crash with keepdims and negative axis (Frederic B., reported by David W.-F.) * Fix crash of theano.[sparse.]dot(x,y) when x or y is a vector. (Frederic B., reported by Zsolt Bitvai) * Fix opt crash/disabled with ifelse on the gpu (Frederic B, reported by Ryan Price) * Fix crash in optimization involving dot22, (Pascal L., reported by @micklat) * Prevent shape optimizations from introducing cycles in the graph (Frederic Bastien, Pascal Lamblin, reported by Kyunghyun Cho) Others: * Update/Fixes/Typo/pep8 documentation and/or tutorial (Olivier D., David W.-F., Frederic B., Yaroslav Halchenko, Micky Latowicki, Ben McCann, Jason Yosinski, reported by Arnaud Bergeron) * Doc how to make a sparse Op. (Frederic B.) * Doc compatibility guide (abalkin) * Fix problem in remove_constants_and_unused_inputs_scan. (useless warning and maybe slow down) (Pascal L.) * Fix rop dot.(Razvan P., reported by Jeremiah Lowin) * Raise better error related to pydot bug. (Frederic B., reported by Jason Yosinski and Ludwig Schmidt-Hackenberg) * Fix to Theano tutorial examples. (reported by Ilya Dyachenko) * Fix SharedVar.value property to make it raise an exception (Frederic B., reported by Drew Duncan) * Fix verification with compute_test_value in grad() (Frederic B.) * Theano flags are now evaluated lazily, only if requested (Frederic B.) * Fix test when g++ is not avail (Frederic B.) * Add manual instructions for OpenBLAS on Ubuntu by (Jianri Li ) * Better/more error messages (Frederic B., Pascal L., Ian Goodfellow) * Fix Error reporting with GpuConv (Frederic B., reported by Heng Luo and Nicolas Pinto) * Now travis-ci tests with scipy the parts that need it (Frederic B.) * Export some functions that work on CudaNdarray for windows (Frederic B.) * If the user specifies a -arch=sm_* value in the Theano flags for the gpu, don't add one (Frederic B., Pascal L.) * If a C thunk returns an error, check if a python exception is set. Otherwise, set a default one (Pascal L.) * Crash fix introduced in the development version (Wei LI) * Added BLAS benchmark result (Frederic B., Ben McCann) * Fix code comment (Hannes Schulz) * More stable tests (Frederic B.) * Add utt.asset_allclose(a, b) to have better error message. (Frederic B.) * Better error message with compute_test_value (Frederic, reported by John Salvatier) * Stochastic order behavior fix (Frederic B.) * Simpler initial graph for subtensor infer shape (Olivier D.) The optimization was doing the optimization, but this allows better reading of the graph before optimization. * Better detection of non-aligned ndarray (Frederic B.) * Update MRG multinomial gradient to the new interface (Mehdi Mirza) * Implement Image2Neibs.perform() to help debug (Frederic B.) * Remove some Theano flags from the compilation key (Frederic B.) * Make theano-nose work on executable '\*.py' files. (Alistair Muldal) * Make theano-nose work with older nose version (Frederic B.) * Add extra debug info in verify_grad() (Frederic B.) Theano 0.6rc3 (February 14th, 2013) =================================== Highlights: * Windows related fixes. * Speed-ups. * Crash fixes. * A few small interface changes. * GPU memory leak fix. * A few corner cases fixes without incidence. * More Theano determinism * tensor.{dot,tensordot} more complete/faster/GPU friendly. * tensor.tensordot now support Rop/Lop * tensor.dot support n-dimensional inputs as NumPy * To support more NumPy syntax: * Add theano.tensor.take() * Add a_tensor_variable.{sort,dot,std,argmin,argmax,argsort,clip,conj,conjugate,repeat,round,trace,real,imag,take} Commiters for this rc3 only: Frederic Bastien Ian Goodfellow Pascal Lamblin Jeremiah Lowin abalkin Olivier Delalleau Razvan Pascanu Rami Al-Rfou' Vivek Kulkarni Guillaume Desjardins David Warde-Farley Eric Hunsberger Amir Elaguizy James Bergstra Bug fix: * Fix memory leak on the GPU in some corner cases with the Theano flags `allow_gc=False`. (Frederic B., reported by Jonas Gehring) * Fix copy of random state between graph. (Guillaume D.) http://deeplearning.net/software/theano/tutorial/examples.html#copying-random-state-between-theano-graphs * Fix wrong dtype in sandbox.linalg.ExtractDiag with shape of 0. (Frederic B., reported by abalkin) * Correctly support array with more then 2*10e32 element in AdvancedSubtensor1. (Abalkin) * Fix wrong broadcast dimensions of output of Repeat op. (Abalkin) We where using the inputs broadcasting pattern in some cases when we shouldn't. * Fix theano.sandbox.linalg.eigh grad that didn't always returned the right dtype. (Frederic B., Olivier D.) New Features: * More Theano determinism (Ian G., Olivier D., Pascal L.) * Add and use a new class OrderedSet. * theano.grad is now deterministic. * Warn when the user uses a (non ordered) dictionary and this causes non-determinism in Theano. * The Updates class was non-deterministic; replaced it with the OrderedUpdates class. * tensor.tensordot now support Rop/Lop (Jeremiah Lowin) This remove the class TensorDot and TensorDotGrad. It is the Dot/Elemwise ops that are used. * tensor.dot support n-dimensional inputs as NumPy (Jeremiah Lowin) Work on the GPU too. * The Theano flag `nvcc.flags` now accept `-ftz=true`, `--prec-div=false` and `--prec=sqrt=false` as value. (Frederic B.) To enable all of them, use the Theano flag `nvcc.flags=--use_fast_math`. * New op theano.sparse.ConstructSparseFromList (Rami Al-Rfou' Vivek Kulkarni) * Make Theano work with Anaconda on Windows. (Pascal L.) * Add tensor_var.diagonal and theano.tensor.{diag,diagonal}. (abalkin) * AdvencedSubtensor1 can now have a sparse gradient. (Rami Al-Rfou', Vivek Kulkarni) * Implemented GpuContiguous.grad. (Ian G.) Interface Deprecation (a warning is printed): * theano.misc.strutil.renderString -> render_string (Ian G.) * Print a warning when using dictionary and this makes Theano non-deterministic. Interface Change: * Raise an error when theano.shared called with a theano variable. (Frederic B.) * Don't print warning for bug before Theano 0.5 by default. (Frederic B.) * Theano functions now always have a field name, default to None. (Frederic B.) * Theano function fct.fgraph have a copy of the Theano function name field. (Ian G.) This is needed to allow the fgraph to know it. * In the grad method, if it were asked to raise an error if there is no path between the variables, we didn't always returned an error. (Ian G.) We returned the mathematical right answer 0 in those cases. * get_constant_value() renamed get_scalar_constant_value() and raise a new exception tensor.basic.NotScalarConstantError. (Ian G.) * theano.function raises an error when trying to replace inputs with the 'given' parameter. (Olivier D.) This was doing nothing, the error message explains what the user probably wants to do. New Interface (reuse existing functionality): * tensor_var.sort() as a shortcut for theano.tensor.sort. (Jeremiah Lowin) We where already doing this for argsort. * Add theano.tensor.take() and a_tensor_var.take() to support NumPy syntax. (abalkin) * Add a_tensor_variable.{dot,std,argmin,argmax,argsort,clip,conj,conjugate,repeat,round,trace,real,imag}. (abalkin) New debug feature: * DebugMode print more info when there is an error. (Frederic B.) * Better profiling of test time with `theano-nose --time-profile`. (Frederic B.) * Detection of infinite loop with global optimizer. (Pascal L.) * DebugMode.check_preallocated_output now also work on Theano function output. (Pascal L.) * DebugMode will now complain when the strides of CudaNdarray of dimensions of 1 are not 0. (Frederic B.) Speed-ups: * c_code for SpecifyShape op. (Frederic B.) * cross-entropy optimization now work when specify_shape is used. (Pascal L.) * The Scan optimization ScanSaveMem and PushOutDot1 applied more frequently. (Razvan P, reported Abalkin) A skipped optimization warning was printed. * dot(vector, vector) now faster with some BLAS implementation. (Eric Hunsberger) OpenBLAS and possibly others didn't call {s,d}dot internally when we called {s,d}gemv. MKL was doing this. * Compilation speed up: Take the compiledir lock only for op that generate c_code. (Frederic B) * More scan optimization (Razvan P.) * Opt to make RNN fast in Theano. * Optimize some case of dot, by moving them outside of Scan. * Move some sequences outside of scan too. * Merge more scan inputs, mostly byproduct of other Scan optimizations. * c_code for theano.sparse.AddSD. (Rami Al-Rfou', Vivek Kulkarni) Crash Fixes: * Fix crash about dimshuffle. (abalkin) * Fix crash at compilation. (Olivier D.) * Fix openmp detection. (Pascal L.) Resulted in a crash with EPD on Windows. * Fix for new BLAS interface in SciPy. (Olivier D.) Fix crash with some development version of SciPy. * GpuSum work with bigger shape when summing on the first dim on 3d tensor. (Frederic B., reported Chris Currivan) * Windows compilation crash fix. (Frederic B.) * Make CrossentropySoftmax1HotWithBiasDx and CrossentropySoftmaxArgmax1HotWithBias support uint* dtype. (Frederic B., reported by Mark Fenner) * Fix GpuSoftmax and GpuSoftmaxWithBias crash on GTX285. (Frederic B.) * Fix crash due to a race condition when importing theano. (Ian G.) * Fix crash from path problem with `theano-nose --batch`. (Abalkin) * Fix crash with tensor.roll(Var, iscalar). (Frederic B., reported by Jeremiah Lowin) * Fix compilation crash with llvm on Mac. (Abalkin) * Fix the grad of Scan that told wrongly that there is no connection between cost and parameters. (Razvan P.) * The infer shape mechanism now force that broadcasted dimensions have a shape know to be equivalent to one during compilation. Sometimes, we where not able knowing this before run time and resulted in crash. (Frederic B.) * Fix compilation problems on GPU on Windows. (Frederic B.) * Fix copy on the GPU with big shape for 4d tensor (Pascal L.) * GpuSubtensor didn't set the stride to 0 for dimensions of 1. This could lead to check failing later that caused a crash. (Frederic B., reported by vmichals) Theoretical bugfix (bug that won't happen with current Theano code, but if you messed with the internal, could have affected you): * GpuContiguous, GpuAlloc, GpuDownSampleGrad, Conv2d now check the preallocated outputs strides before using it. (Pascal L.) * GpuDownSample, GpuDownSampleGrad didn't work correctly with negative strides in their output due to problem with nvcc (Pascal L, reported by abalkin?) Others: * Fix race condition when determining if g++ is available. (Abalkin) * Documentation improvements. (Many people including David W-F, abalkin, Amir Elaguizy, Olivier D., Frederic B.) * The current GPU back-end have a new function CudaNdarray_prep_output(CudaNdarray ** arr, int nd, const int * dims) (Ian G) Theano 0.6rc2 (November 21th, 2012) =================================== Highlights: * Fix for a few regressions introduced in 0.6rc1. * A few new features. * Speed-ups. * Scan fixes. * Crash fixes. * A few small interface changes. Commiters for this rc2 only: Razvan Pascanu Pascal Lamblin Frederic Bastien Ian Goodfellow Jeremiah Lowin Caglar Gulcehre Jey Kottalam Matthew Rocklin abalkin Regressions in 0.6rc1 fixed: * Fixed the scan gradient dtype issue. In 0.6rc1, some upcast were inserted. (Razvan P.) * Now grad() will do as before 0.6rc1 for float, i.e. the grad dtype will be the same as the inputs inside the graph. If you ask for the direct grad, it will return the computed dtype. (Pascal L.) Wrong results fixes: * Scan fix in some case didn't returned the good results. (Razvan P., reported by Jeremiah L.) This happened if you had a state with only neg tap and the output of the state was a function of some sequence. If you had multiple states, there was no problem. * Fixed bug in Scan with multiple outputs, where one output would sometimes overwrite another one. (Razvan P.) * Clip.grad treated the gradient with respect to the clipping boundary as always 0. (Ian G.) Interface changes: * We do not support anymore unaligned ndarray in Python code. (Frederic B.) We did not support it in C code and supporting it in Python code made the detection harder. * Now we only officially support SciPy 0.7.2 and NumPy 1.5.0 (Frederic B.) We weren't and aren't testing with older versions. * The theano.sparse.SparseType is available even when SciPy is not (Frederic B.) * Fixed issue where members of consider_constant grad parameter were treated differently from Constant variables. (Ian G.) * Removed the parameter g_cost from theano.grad(). (Ian G.) Use the new more powerful parameter known_grads instead. NumPy interface support: * theano.tensor.where is an alias for theano.tensor.switch to support NumPy semantic. (Ian G.) * TensorVariable objects now have dot, argmin, argmax, clip, conj, repeat, trace, std, round, ravel and argsort functions and the real and imag properties as numpy.ndarray objects. The functionality was already available in Theano. (abalkin) Speed-ups: * A C version of the SoftMax op (Razvan P.) There was C code for the softmax with bias code. * Faster GpuIncSubtensor (Ian G.) * Faster copy on the GPU for 4d tensor. (Ian G.) * The fix of flatten infer_shape re-enables an optimization (Pascal L.) * The bug was introduced in 0.6rc1. * Enable inc_subtensor on the GPU when updating it with a float64 dtype. (Ian G.) It was causing an optimization warning. * Make DeepCopy reuse preallocated memory. (Frederic B.) * Move the convolution to the GPU when the image shape and logical image shape differ. (Frederic Bastien) * C code for the View Op (Razvan P., Pascal L.) New Features: * Added a monitoring mode "MonitorMode" as a debugging tool. (Olivier D.) * Allow integer axes when keepdims==True (Jeremiah Lowin) * Added erfinv and erfcinv op. (Jey Kottalam) * Added tensor.batched_dot(). (Caglar Gulcehre) It uses scan behind the scenes, but makes doing this easier. * theano.get_constant_value(x) (Frederic B.) This tries to have x as a constant int. This does some constant folding to try to convert x into an int. Used by some optimizations. * Add theano.tensor.io.{MPIRecv,MPIRecvWait,MPISend,MPISendWait} (Matthew Rocklin) Theano does not automatically use them. It is up to you to use them and split your computations. * Added theano.sandbox.linalg.eig (abalkin) * Started some support for Python3 (abalkin) setup.py supports python3 now. It calls 2to3 during the setup. Python3 is not fully supported as we didn't update the C code. Crash Fixes: * Fix a crash related to scan.grad due to the new mechanism. (Ian G.) * Fix an optimization warning. Now it gets optimized. (Frederic B.) * Fix crash introduced in 0.6rc1 in theano.grad (Ian G.) * Fix crash introduced in 0.6rc1 in the grad of scan (Razvan P.) * Fix crash introduced in 0.6rc1 in the grad of clip (Ian G.) Also implement the gradient on the min/max bound. * Fix crash in the grad of tensor.switch for int (Ian G.) * Fix crash when mixing shared variable on the GPU and sparse dot. (Pascal L.) * Fix crash as sometimes sparse.dot would return a different dtype number that is equivalent but not the one expected. (Pascal L., reported by Rami Al-Rfou) * Better error msg (Ian G.) * Move all sparse random functions back to sandbox as they don't have a state inside Theano. (Pascal L.) They were moved outside the sandbox in 0.6rc1 * LoadFromDisk now is allowed to only support some memmap mode. (Pascal L.) Otherwise, this was causing errors, segmentation faults or wrong results. * Fix import problem on PiCloud (Jeremiah Lowin) * You need to use the c|py linker with the default environment. Otherwise, you need to create your own environment. * Fix a crash during optimization when we take a subtensor of a constant with a non constant index. (Ian G.) * Better handling and error message of gradients on integer. (Ian G.) * Fixed a crash where Scan assumed all TypeErrors raised by the grad function were due to undefined gradients (Ian G.) Other: * Doc typo fixes, Doc updates, Better error messages: Olivier D., David W.F., Frederic B., James B., Matthew Rocklin, Ian G., abalkin. Theano 0.6rc1 (October 1st, 2012) ================================= Highlights: * Bug fixes, crash fixes, CPU and GPU speed up. * theano_var.eval({other_var: val[,...]} to simplify the usage of Theano (Ian G.) * New default linker `cvm`. This is the execution engine that tells ops to run in certain orders. It is now implemented in C and enables lazy evaluation of ifelse op. * Faster theano.function compilation. (Pascal L., Ian G.) * Big sparse submodule update and documentation of it. (Nicolas Bouchard) * Use GPU asynchronous functionality (Frederic B.) * Better Windows support. Known bugs: * A few crash cases that will be fixed by the final release. Bug fixes: * Outputs of Scan nodes could contain corrupted values: some parts of the output would be repeated a second time, instead of the correct values. It happened randomly, and quite infrequently, but the bug has been present (both in Python and Cython) since April 2011. (Pascal L.) * In Sparse sandbox, fix the grad of theano.sparse.sandbox.sp.row_scale. It did not return the right number of elements. (Frederic B.) * set_subtensor(x[int vector], new_value) when moved to the GPU was transformed into inc_subtensor on the GPU. Now we have a correct (but slow) GPU implementation. Note 1: set_subtensor(x[slice[,...]], new_value) was working correctly in all cases as well as all inc_subtensor. Note 2: If your code was affected by the incorrect behavior, we now print a warning by default (Frederic B.) * Fixed an issue whereby config values were used as default arguments, with those defaults then stuck at old values if the config variables were changed during program execution. (David W-F) * Fixed many subtle bugs involving mutable default arguments which may have led to unexpected behavior, such as objects sharing instance variables they were not supposed to share. (David W-F) * Correctly record the GPU device number used when we let the driver select it. (Frederic B.) * Min, max with NaN in inputs did not return the right output. (Pascal L.) * The grad of TensorDot, was returning the wrong shape for some combination of axes. We now raise NotImplementedError in those cases. (Frederic B.) * conv2d with subsample >2 returned wrong values. (Pascal L.) * Fixed when mode==valid, disabled when mode==full * theano.sparse.CSMGrad op (generated by the grad of CSM) didn't handle unsorted input correctly and gradient that is sparser than the input. In that case, a bad result was returned. But this could happen only when a sparse input of a Theano function was not sorted. This happens for example with sparse advanced indexing from scipy. The conclusion is most of time Nan in the graph. (Yann Dauphin) * theano.sparse._dot(CSC matrix, dense) optimized version UsmmCSCDense didn't handle correctly not contiguous inputs/outputs. (Pascal L.) * Fix a corner case CVM updates case. (Pascal L.) This happened if the update to a shared variable is itself after optimization. The CVM was not used by default. * Fix the view_map of sparse.Transpose and sparse.sandbow.sp.RowScale. (Frederic B.) This probably didn't cause problem as there is only the UsmmCscDense op (used call to Usmm with CSC matrix) that could interfere with them. Deprecation: * Deprecated the Module class (Ian G.) This was a predecessor of SharedVariable with a less pythonic philosophy. Interface changes: * Now the base version requirements are numpy >= 1.5.0 and the optional scipy >= 0.7.2. * In Theano 0.5, we removed the deprecated sharedvar.value property. Now we raise an error if you access it. (Frederic B.) * theano.function does not accept duplicate inputs, so function([x, x], ...) does not work anymore. (Pascal L.) * theano.function now raises an error if some of the provided inputs are not part of the computational graph needed to compute the output, for instance, function([x, y], [y]). You can use the kwarg ``on_unused_input={'raise', 'warn', 'ignore'}`` to control this. (Pascal L.) * New Theano flag "on_unused_input" that defines the default value of the previous point. (Frederic B.) * tensor.alloc() now raises an error during graph build time when we try to create less dimensions than the number of dimensions the provided value have. In the past, the error was at run time. (Frederic B.) * Remove theano.Value and related stuff (Ian G.) This was a test of what ended up as SharedVariable. * Renamed Env to FunctionGraph, and object attribute "env" to "fgraph" (Ian G.) Deprecation warning printed when you try to access the "env" attribute. * Renamed the FunctionGraph.nodes attribute to FunctionNodes.apply_nodes (Ian G.) * Warn when we don't handle correctly the parameter in Theano flags `nvcc.flags` (Frederic B.) * Do not reorder the user flags passed to the compiler. They get set after other flags. (Frederic B.) * Make setuptools optional (Ilan Schnell) * We warn when a user tries to use an old GPU with which Theano is untested. This could cause crash and will also be very slow. (Frederic B.) * Make theano.grad able to differentiate between not implemented, undefined and disconnected grad. Op.grad function should return theano.gradient.{grad_not_implemented,grad_undefined} or something of DisconectedType (Ian G.) * Make theano.grad expect to always receive a float or undefined gradient and enforce that op with integer output values always return 0. (Ian G.) New memory output contract (was mentioned in the release notes of Theano 0.5): * Now the output memory received can be preallocated by other stuff. In the past it was always the previous output an Apply node allocated. So this means that the shape and strides can be different from previous calls and there can be links to this memory at other places. This means it could receive preallocated output that is not c_contiguous. But we don't do that now. (Pascal L.) * New Theano flags to test this DebugMode.check_preallocated_output (Pascal L.) * Updated a few ops to respect this contract (Pascal L.) New Features: * GPU scan now works (does not crash) when there is a mixture of float32 and other dtypes. * theano_var.eval({other_var:val[,...]} to simplify the usage of Theano (Ian G.) * debugprint new param ids=["CHAR", "id", "int", ""] This makes the identifier printed to be a unique char, the Python id, a unique int, or not have it printed. We changed the default to be "CHAR" as this is more readable. (Frederic B.) * debugprint new param stop_on_name=[False, True]. If True, we don't print anything below an intermediate variable that has a name. Defaults to False. (Frederic B.) * debugprint does not print anymore the "|" symbol in a column after the last input. (Frederic B.) * If you use Enthought Python Distribution (EPD) now we use its blas implementation by default. (Frederic B., Graham Taylor, Simon McGregor) * MRG random now raises an error with a clear message when the passed shape contains dimensions with bad value like 0. (Frederic B. reported by Ian G.) * "CudaNdarray[*] = ndarray" works in more cases (Frederic B.) * "CudaNdarray[*] += ndarray" works in more cases (Frederic B.) * We add dimensions to CudaNdarray to automatically broadcast more frequently. (Frederic B.) * New theano flag cmodule.warn_no_version. Default False. If True, will print a warning when compiling one or more Op with C code that can't be cached because there is no c_code_cache_version() function associated to at least one of those Ops. (Frederic B.) * CPU alloc now always generate C code (Pascal L.) * New Theano flag cmodule.warn_no_version=False. When True, warn when an op with C code is not versioned (which forces to recompile it everytimes). (Frederic B.) * C code reuses preallocated outputs (only done by Scan) (Pascal L.) * Garbage collection of intermediate results during Theano function calls for Ops with C code (Pascal L.) * Theano flag compiledir_format now supports the parameter "numpy_version" and "g++". (Frederic B.) * Theano GPU variables, shared variables and constants now support <, <=, > and >= similar to those not on the GPU. * AdvancedIncSubtensor now supports the set_instead_of_inc parameter. (Eric L.) * Added Advanced Indexing support to inc_subtensor and set_subtensor. (Eric L.) * theano.tensor.{any,all,std,var,mean,prod,sum,argmin,argmax,min,max,max_and_argman} have a new parameter keepdims (Eric L.) This allows to broadcast it correctly against the input data to normalize it. * The Updates objects now check that the keys are SharedVariable when we pass them in the __init__ function. (Pascal L.) * Set a Theano Variable name on transposed op when the input has one (Frederic B). * The cvm linker now supports garbage collection (enabled by default). (James B. Arnaud B., Pascal L.) * The cvm linker is now the default linker. This makes the "loop" around the execution of apply node in C. So this lowers the overhead. * theano_variable[numpy.newaxis] is now supported (James B.) * Enable ifelse on the GPU. (Frederic B.) * Correctly support numpy.memmap everywhere (Pascal L.) We add partial support for them before. Just use the normal tensor operation on them and it should work. But be careful not to exhaust your computer memory! (we always generate normal ndarray) * Add an optimization that stabilizes log(softmax(x)). (Ian G.) * Re-enable the Images2Neibs grad. It was not broken, the problem was how we tested it. (Frederic B.) * If `theano_fn.trust_input` is set to False, do not check if the inputs are good when calling the theano function. (Frederic B.) * Add theano.tensor.blas,gem{m,v} as shortcut. * theano.grad(..., add_names=True). False for the old behavior. Otherwise it tries to name the grad variables. (Ian G.) * theano-nose (Pascal L.) A wrapper around nosetests that adds needed extensions. * --profile-time option, to print time spent in each test (Eric L.) * --batch option, to allow to run tests in batch to lower memory requirement. * m = mean(log(1 - sigm(x))) x - scalar * theano.grad(m, x) There is a stabilization optimization for this. Now it is applied more frequently. (Pascal L.) New Op/functions: * Added element-wise operation theano.tensor.{GammaLn,Psi} (John Salvatier, Nicolas Bouchard) * Added element-wise operation theano.tensor.{arcsin,arctan,arccosh,arcsinh,arctanh,exp2,arctan2} (Nicolas Bouchard) * Added element-wise operation theano.tensor.{gamma,conj,complex_from_polar,expm1,deg2rad,rad2deg,trunc,gamma} (Nicolas Bouchard) * Added theano.tensor.argsort that wraps numpy.argsort (Hani Almousli). * Added theano.tensor.diff that wraps numpy.diff (Nicolas B.) * Added theano.tensor.bincount that wraps numpy.bincount (Nicolas B., Pascal L, Frederic B.) * Added theano.tensor.squeeze (Nicolas B.) This removes broadcasted dimensions from the variable. Theano-esque version of numpy.squeeze. * Added theano.tensor.repeat that wraps numpy.repeat (Nicolas B. + PL) * Added theano.tensor.bartlett that wraps numpy.bartlett (Eric L.) * Added theano.tensor.fill_diagonal that wraps numpy.fill_diagonal (Eric L., Frederic B.) * Added tensor.square that is an alias for tensor.sqr as NumPy (Ian G.) * Added theano.tensor.load(path, dtype, broadcastable, mmap_mode=None) op that allows to load a .npy file in a theano graph (Matthew Rocklin) * theano.sandbox.linalg.kron.py:Kron op. (Eric L.) Kronecker product Speed up: * CPU convolutions are now parallelized (Frederic B.) By default use all cores/hyper-threads. To control it, use the `OMP_NUM_THREADS=N` environment variable where N is the number of parallel threads to use. By default it is equal to the number of CPU cores/hyper threads that you have. There is a new Theano flag `openmp` to allow/disallow openmp op. If your BLAS library is parallelized, this flag won't affect it, but the env variable will. * Remove a corner case causing duplicated dot22/gemm in the graph. (Frederic B., Ian G.) * Enable fusion of elemwise that have the same clients multiple times. (Frederic B.) * New optimization: Remove reduction over broadcastable dimensions (James B., Frederic B.) * Faster theano.function compilation. (Pascal L., Ian G.) * Remove GPU transfer around specify_shape op. (Frederic B.) * Implemented/tested MANY op.infer_shape method (Eric Larsen) This allows Theano to make better shape inferance. * Implement Solve.infer_shape (Matthew Rocklin) * Scan memory optimizations now work more frequently. (Razvan P.) There was a warning printed by the subtensor optimization in those cases. * Faster rng_mrg Python code. (mostly used for tests) (Frederic B.) Speed up GPU: * Convolution on the GPU now checks the generation of the card to make it faster in some cases (especially medium/big ouput image) (Frederic B.) * We had hardcoded 512 as the maximum number of threads per block. Newer cards support up to 1024 threads per block. * Faster GpuAdvancedSubtensor1, GpuSubtensor, GpuAlloc (Frederic B.) * We now pass the GPU architecture to nvcc when compiling (Frederic B.) * Now we use the GPU function async feature by default. (Frederic B.) Set the environment variable `CUDA_LAUNCH_BLOCKING` to `1` to disable this for profiling or debugging. * Faster creation of CudaNdarray objects (Frederic B.) * Now some Max reductions are implemented on the GPU. (Ian G.) Sparse Sandbox graduate (moved from theano.sparse.sandbox.sp): * sparse.remove0 (Frederic B., Nicolas B.) * sparse.sp_sum(a, axis=None) (Nicolas B.) * bugfix: the not structured grad was returning a structured grad. * sparse.{col_scale,row_scale,ensure_sorted_indices,clean} (Nicolas B.) * sparse.{diag,square_diagonal} (Nicolas B.) Sparse: * Support for uint* dtype. * Implement theano.sparse.mul(sparse1, sparse2) when both inputs don't have the same sparsity pattern. (Frederic B.) * New Ops: sparse.{expm1,deg2rad,rad2deg,trunc} (Nicolas B.) * New Ops: sparse.{sqrt,sqr,log1p,floor,ceil,sgn,round_half_to_even} (Nicolas B.) * New Ops: sparse.{arctanh,tanh,arcsinh,sinh,arctan,arcsin,tan,sin} (Nicolas B.) * New functions: structured_{add,exp,log,pow,minimum,maximum,sigmoid} (Yann D., Nicolas B.) * Optimized op: StructuredAddSV, StrucutedAddSVCSR (inserted automatically) * New Op: sparse.mul_s_v multiplication of sparse matrix by broadcasted vector (Yann D.) * New Op: sparse.Cast() (Yann D., Nicolas B.) * Add sparse_variable.astype() and theano.sparse.cast() and theano.sparse.{b,w,i,l,f,d,c,z}cast() as their tensor equivalent (Nicolas B.) * Op class: SamplingDot (Yann D., Nicolas B.) * Optimized version: SamplingDotCsr, StructuredDotCSC * Optimizations to insert the optimized version: local_sampling_dot_csr, local_structured_add_s_v * New Ops: sparse.{Multinomial,Poisson,Binomial} (Yann D., NB) * Implement the CSMProperties grad method (Yann Dauphin) * Move optimizations to theano/sparse/opt.py (Nicolas B.) New flags: * `profile=True` flag now prints the sum of all printed profiles. (Frederic B.) * It works with the linkers vm/cvm (default). * Also print compile time, optimizer time and linker time. * Also print a summary by op class. * new flag "profile_optimizer" (Frederic B.) when profile=True, will also print the time spent in each optimizer. Useful to find optimization bottleneck. * new flag "cmodule.remove_gxx_opt" (Frederic B.) If True, will remove -O* parameter passed to g++. This is useful to debug in gdb module compiled by Theano. The parameter -g is passed by default to g++. * new flag cmodule.compilation_warning if True, will print compilation warning. * new flag `allow_gc` (Frederic B.) When False, do not garbage collect intermediate results when they are not needed. This uses more memory, but allocates memory less frequently so faster. * new flag `vm.lazy` (Frederic B.) Useful only for the vm linkers. When lazy is None, auto detect if lazy evaluation is needed and use the apropriate version. If lazy is True/False, force the version used between Loop/LoopGC and Stack. * new flag `cxx`. This is the C++ compiler to use. If empty do not compile C code. (Frederic B.) * New flag `print_active_device` that defaults to True. (Matthew R.) Documentation: * Added in the tutorial documentation on how to extend Theano. This explains how to make a Theano Op from a Python function. http://deeplearning.net/software/theano/tutorial/extending_theano.html (Frederic B.) * New installation instructions for Windows using EPD (Pascal L.) * New installation on Windows by using a Linux VM from ContinuumIO (Frederic B.) * Revisions of Theano tutorial and addition of exercises to it. (Eric L.) * New tutorial on Sparse variable. (Nicolas B., Sebastien Lemieux, Frederic Bastien http://www.deeplearning.net/software/theano/tutorial/sparse.html * Installation documentation for CentOS6 (Frederic B.) * Installation documentation for Ubuntu (with GPU) (Frederic B., Matthias Zoehrer) * Doc typo fixes, Doc updates, Better error messages: Olivier D., David W.F., Frederic B., James B., Matthew Rocklin, Ian G. * Python Memory Management tutorial (Steven Pigeon, Olivier D.) Proposal: * Math framework for complex gradients (Pascal L.) 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.) * Made a few Ops with C code versioned to reduce compilation time. (Frederic B, Pascal L.) * Better deletion of files in the compiledir (Frederic B.) * Safer import on sort op (Nicolas Pinto) * hash_from_dict for elemwise op (Fredric B.) * Renamed BadCLinkerOutput into BadThunkOutput. (PL) * tensor.utils.shape_of_variables (Matthew R.) * Add the numpy abi version and g++/nvcc version in the key of compiled code. (Frederic B.) * env.replace_all_validate_remove (Frederic B.) This allows global optimizer to ensure it removed some nodes from the graph. This is a generic way to catch errors that would otherwise duplicate computation. * It was used for GEMM and Scan optimization (Frederic B., Razvan P.) * Fix how exception are raised in GPU code (James B.) * Made code respect pep8: OD, Fred, Pascal L., Nicolas Bouchard, Eric Larsen and others. * TensorType and CudaNdarrayType now have a value_zeros method that call CudaNdarray.zeros or numpy.zeros with the right dtype. (Pascal L., Olivier D.) This allows to have the same code work with both types. * Renamed FunctionGraph.extend function to FunctionGraph.attach_feature. (Ian G.) * New exception MissingGXX when we try to compile but there is no cxx compiler. (Frederic B.) * New fct theano.gof.utils.give_variables_names(...) that gives unique names to variables. (Matthew R.) * Use most of the time the new NumPy C-API for later NumPy release. (Frederic B.) * New theano.gof.sched.sort_apply_nodes() that will allow other execution ordering. (Matthew R.) * New attribute sort_schedule_fn, a way to specify a scheduler to use. (Matthew R.) Crash Fix: * Fix import conflict name (usaar33, Frederic B.) * This makes Theano work with PiCloud. * Do not try to use the BLAS library when blas.ldflags is manually set to an empty string (Frederic B., Pascal L.) * When importing theano on a computer without GPU with the Theano flags 'device' or 'init_gpu_device' set to gpu* (Frederic B., reported by Luo Heng) * Optimization printed a useless error when scipy was not available. (Frederic B.) * GPU conv crash/slowdown on newer hardware (James B.) * Better error handling in GPU conv (Frederic B.) * GPU optimization that moves element-wise Ops to the GPU. Crash happened in a particular execution order of this optimization and the element-wise fusion optimization when upcasting some inputs to float32 (to compute them on the GPU). (Frederic B., reported by Sander Dieleman) * GpuReshape in some particular case when the input is not contiguous (Frederic B., reported by Sander Dieleman) * GpuSoftmaxWithBias with shape (0, N) with N > 1. (Frederic 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) * Fixed issue with the MaxAndArgmax Op not properly preserving broadcastable dimensions, which could typically result in optimization crashes (Olivier D.) * Fixed crash when concatenating some arrays with specific broadcasting patterns (Olivier D.) * Work around a known issue with nvcc 4.1 on MacOS X. (Graham Taylor) * In advanced indexing, if some inputs are constant, no need to call constant(...) on their value any more. (Pascal L., reported by John Salvatier) * Fix crash on GPU when the GpuSubtensor didn't put the right stride when the result tensor had a dimension with size of 1. (Pascal L, reported Graham T.) * Fix scan crash that made it not run on the GPU in one case. (Guillaume D.) * If you grad again a random state, don't crash (Razvan P.) * GpuDownsampleFactorMax and its grad with inputs dimensions 0 and 1 bigger then 65535. (Frederic B. reported by Gabe Schwartz) * Potential crash due to parallel compilation when importing theano.sandbox.cuda (Olivier D.) * Crash fix on python 2.4 with slicing. (Pascal L.) * grad of argmin and argmax (Razvan P.) * Don't compute the Rop for shared variables with updates (mostly random). We don't use them and they caused crash. (Razvan P.) * MaxArgmax.grad() when one of the gradient it receives is None. (Razvan P, reported by Mark Fenner) * Fix crash of GpuSum when some dimensions shape was 0. (Frederic B.) Tests: * Use less memory (Olivier D.) (fix crash on 32-bit computers) * Fix test with Theano flag "blas.ldflags=". (Frederic B., Pascal L.) * Fix crash with advanced subtensor and numpy constant. * Fix random tests crash due to random value. (Pascal L.) * Always introduce Alloc node when calling alloc and let the optimizer remove them if needed. This allows DebugMode to catch some shape error. (Pascal L.) * DebugMode now checks the view_map for all types of Theano variables. It was doing only variables of tensor type. (Frederic B.) Others: * Remove python warning for some python version. (Gabe Schwartz) * Remove useless fill op in fast_compile mode to make the graph more readable. (Fredric B.) * Remove GpuOuter as it is a subset of the new GpuGer (Frederic B.) * Now we use http://travis-ci.org/ to run all CPU tests (without SciPy) with the default mode on all Pull Requests. This should make the trunk more stable. (Fredric B.) * Our nightly buildbot now checks on python 2.4 (Frederic B.) This should make the trunk work on it more frequently. Other thanks: * blaxill reported an error introduced into the trunk. New stuff that will probably be reworked/removed before the release: * Better PyCUDA sharing of the GPU context.(fix crash at exit) (Frederic B.) TODO: there is still a crash at exit! Theano 0.5 (23 February 2012) ============================= Highlights: * Moved to github: http://github.com/Theano/Theano/ * Old trac tickets moved to assembla tickets: http://www.assembla.com/spaces/theano/tickets * Theano vision: http://deeplearning.net/software/theano/introduction.html#theano-vision (Many people) * Theano with GPU works in some cases on Windows now. Still experimental. (Sebastian Urban) * Faster dot() call: New/Better direct call to cpu and gpu ger, gemv, gemm and dot(vector, vector). (James, Frédéric, Pascal) * C implementation of Alloc. (James, Pascal) * theano.grad() now also works with sparse variables. (Arnaud) * Macro to implement the Jacobian/Hessian with theano.tensor.{jacobian,hessian} (Razvan) * See the Interface changes. Interface Behavior Changes: * The current default value of the parameter axis of theano.{max,min,argmax,argmin,max_and_argmax} is now the same as numpy: None. i.e. operate on all dimensions of the tensor. (Frédéric Bastien, Olivier Delalleau) (was deprecated and generated a warning since Theano 0.3 released Nov. 23rd, 2010) * The current output dtype of sum with input dtype [u]int* is now always [u]int64. You can specify the output dtype with a new dtype parameter to sum. The output dtype is the one used for the summation. There is no warning in previous Theano versions about this. The consequence is that the sum is done in a dtype with more precision than before. So the sum could be slower, but will be more resistant to overflow. This new behavior is the same as numpy. (Olivier, Pascal) * When using a GPU, detect faulty nvidia drivers. This was detected when running Theano tests. Now this is always tested. Faulty drivers result in wrong results for reduce operations. (Frederic B.) Interface Features Removed (most were deprecated): * The string modes FAST_RUN_NOGC and STABILIZE are not accepted. They were accepted only by theano.function(). Use Mode(linker='c|py_nogc') or Mode(optimizer='stabilize') instead. * tensor.grad(cost, wrt) now always returns an object of the "same type" as wrt (list/tuple/TensorVariable). (Ian Goodfellow, Olivier) * A few tag.shape and Join.vec_length left have been removed. (Frederic) * The .value attribute of shared variables is removed, use shared.set_value() or shared.get_value() instead. (Frederic) * Theano config option "home" is not used anymore as it was redundant with "base_compiledir". If you use it, Theano will now raise an error. (Olivier D.) * scan interface changes: (Razvan Pascanu) * The use of `return_steps` for specifying how many entries of the output to return has been removed. Instead, apply a subtensor to the output returned by scan to select a certain slice. * The inner function (that scan receives) should return its outputs and updates following this order: [outputs], [updates], [condition]. One can skip any of the three if not used, but the order has to stay unchanged. Interface bug fix: * Rop in some case should have returned a list of one Theano variable, but returned the variable itself. (Razvan) New deprecation (will be removed in Theano 0.6, warning generated if you use them): * tensor.shared() renamed to tensor._shared(). You probably want to call theano.shared() instead! (Olivier D.) Bug fixes (incorrect results): * On CPU, if the convolution had received explicit shape information, they were not checked at runtime. This caused wrong result if the input shape was not the one expected. (Frederic, reported by Sander Dieleman) * Theoretical bug: in some case we could have GPUSum return bad value. We were not able to reproduce this problem * patterns affected ({0,1}*nb dim, 0 no reduction on this dim, 1 reduction on this dim): 01, 011, 0111, 010, 10, 001, 0011, 0101 (Frederic) * div by zero in verify_grad. This hid a bug in the grad of Images2Neibs. (James) * theano.sandbox.neighbors.Images2Neibs grad was returning a wrong value. The grad is now disabled and returns an error. (Frederic) * An expression of the form "1 / (exp(x) +- constant)" was systematically matched to "1 / (exp(x) + 1)" and turned into a sigmoid regardless of the value of the constant. A warning will be issued if your code was affected by this bug. (Olivier, reported by Sander Dieleman) * When indexing into a subtensor of negative stride (for instance, x[a:b:-1][c]), an optimization replacing it with a direct indexing (x[d]) used an incorrect formula, leading to incorrect results. (Pascal, reported by Razvan) * The tile() function is now stricter in what it accepts to allow for better error-checking/avoiding nonsensical situations. The gradient has been disabled for the time being as it only implemented (incorrectly) one special case. The `reps` argument must be a constant (not a tensor variable), and must have the same length as the number of dimensions in the `x` argument; this is now checked. (David) Scan fixes: * computing grad of a function of grad of scan (reported by Justin Bayer, fix by Razvan) before: most of the time crash, but could be wrong value with bad number of dimensions (so a visible bug) now: do the right thing. * gradient with respect to outputs using multiple taps (reported by Timothy, fix by Razvan) before: it used to return wrong values now: do the right thing. Note: The reported case of this bug was happening in conjunction with the save optimization of scan that give run time errors. So if you didn't manually disable the same memory optimization (number in the list4), you are fine if you didn't manually request multiple taps. * Rop of gradient of scan (reported by Timothy and Justin Bayer, fix by Razvan) before: compilation error when computing R-op now: do the right thing. * save memory optimization of scan (reported by Timothy and Nicolas BL, fix by Razvan) before: for certain corner cases used to result in a runtime shape error now: do the right thing. * Scan grad when the input of scan has sequences of different lengths. (Razvan, reported by Michael Forbes) * Scan.infer_shape now works correctly when working with a condition for the number of loops. In the past, it returned n_steps as the length, which is not always true. (Razvan) * Scan.infer_shape crash fix. (Razvan) New features: * AdvancedIncSubtensor grad defined and tested (Justin Bayer) * Adding 1D advanced indexing support to inc_subtensor and set_subtensor (James Bergstra) * tensor.{zeros,ones}_like now supports the dtype param as numpy (Frederic) * Added configuration flag "exception_verbosity" to control the verbosity of exceptions (Ian) * theano-cache list: list the content of the theano cache (Frederic) * theano-cache unlock: remove the Theano cache lock (Olivier) * tensor.ceil_int_div to compute ceil(a / float(b)) (Frederic) * MaxAndArgMax.grad now works with any axis (The op supports only 1 axis) (Frederic) * used by tensor.{max,min,max_and_argmax} * tensor.{all,any} (Razvan) * tensor.roll as numpy: (Matthew Rocklin, David Warde-Farley) * Theano with GPU works in some cases on Windows now. Still experimental. (Sebastian Urban) * IfElse now allows to have a list/tuple as the result of the if/else branches. * They must have the same length and corresponding type (Razvan) * Argmax output dtype is now int64 instead of int32. (Olivier) * Added the element-wise operation arccos. (Ian) * Added sparse dot with dense grad output. (Yann Dauphin) * Optimized to Usmm and UsmmCscDense in some case (Yann) * Note: theano.dot and theano.sparse.structured_dot() always had a gradient with the same sparsity pattern as the inputs. The new theano.sparse.dot() has a dense gradient for all inputs. * GpuAdvancedSubtensor1 supports broadcasted dimensions. (Frederic) * TensorVariable.zeros_like() and SparseVariable.zeros_like() * theano.sandbox.cuda.cuda_ndarray.cuda_ndarray.device_properties() (Frederic) * theano.sandbox.cuda.cuda_ndarray.cuda_ndarray.mem_info() return free and total gpu memory (Frederic) * Theano flags compiledir_format. Keep the same default as before: compiledir_%(platform)s-%(processor)s-%(python_version)s. (Josh Bleecher Snyder) * We also support the "theano_version" substitution. * IntDiv C code (faster and allows this elemwise to be fused with other elemwise) (Pascal) * Internal filter_variable mechanism in Type. (Pascal, Ian) * Ifelse works on sparse. * It makes use of gpu shared variable more transparent with theano.function updates and givens parameter. * Added a_tensor.transpose(axes) axes is optional (James) * theano.tensor.transpose(a_tensor, kwargs) We were ignoring kwargs, now it is used as the axes. * a_CudaNdarray_object[*] = int, now works (Frederic) * tensor_variable.size (as numpy) computes the product of the shape elements. (Olivier) * sparse_variable.size (as scipy) computes the number of stored values. (Olivier) * sparse_variable[N, N] now works (Li Yao, Frederic) * sparse_variable[M:N, O:P] now works (Li Yao, Frederic, Pascal) M, N, O, and P can be Python int or scalar tensor variables, None, or omitted (sparse_variable[:, :M] or sparse_variable[:M, N:] work). * tensor.tensordot can now be moved to GPU (Sander Dieleman, Pascal, based on code from Tijmen Tieleman's gnumpy, http://www.cs.toronto.edu/~tijmen/gnumpy.html) * Many infer_shape implemented on sparse matrices op. (David W.F.) * Added theano.sparse.verify_grad_sparse to easily allow testing grad of sparse op. It supports testing the full and structured gradients. * The keys in our cache now store the hash of constants and not the constant values themselves. This is significantly more efficient for big constant arrays. (Frederic B.) * 'theano-cache list' lists key files bigger than 1M (Frederic B.) * 'theano-cache list' prints an histogram of the number of keys per compiled module (Frederic B.) * 'theano-cache list' prints the number of compiled modules per op class (Frederic B.) * The Theano flag "nvcc.fastmath" is now also used for the cuda_ndarray.cu file. * Add the header_dirs to the hard part of the compilation key. This is currently used only by cuda, but if we use libraries that are only headers, this can be useful. (Frederic B.) * The Theano flag "nvcc.flags" is now included in the hard part of the key. This means that now we recompile all modules for each value of "nvcc.flags". A change in "nvcc.flags" used to be ignored for modules that were already compiled. (Frederic B.) * Alloc, GpuAlloc are not always pre-computed (constant_folding optimization) at compile time if all their inputs are constant. (Frederic B., Pascal L., reported by Sander Dieleman) * New Op tensor.sort(), wrapping numpy.sort (Hani Almousli) New optimizations: * AdvancedSubtensor1 reuses preallocated memory if available (scan, c|py_nogc linker) (Frederic) * dot22, dot22scalar work with complex. (Frederic) * Generate Gemv/Gemm more often. (James) * Remove scan when all computations can be moved outside the loop. (Razvan) * scan optimization done earlier. This allows other optimizations to be applied. (Frederic, Guillaume, Razvan) * exp(x) * sigmoid(-x) is now correctly optimized to the more stable form sigmoid(x). (Olivier) * Added Subtensor(Rebroadcast(x)) => Rebroadcast(Subtensor(x)) optimization. (Guillaume) * Made the optimization process faster. (James) * Allow fusion of elemwise when the scalar op needs support code. (James) * Better opt that lifts transpose around dot. (James) Crashes fixed: * T.mean crash at graph building time. (Ian) * "Interactive debugger" crash fix. (Ian, Frederic) * Do not call gemm with strides 0, some blas refuse it. (Pascal Lamblin) * Optimization crash with gemm and complex. (Frederic) * GPU crash with elemwise. (Frederic, some reported by Chris Currivan) * Compilation crash with amdlibm and the GPU. (Frederic) * IfElse crash. (Frederic) * Execution crash fix in AdvancedSubtensor1 on 32 bit computers. (Pascal) * GPU compilation crash on MacOS X. (Olivier) * Support for OSX Enthought Python Distribution 7.x. (Graham Taylor, Olivier) * When the subtensor inputs had 0 dimensions and the outputs 0 dimensions. (Frederic) * Crash when the step to subtensor was not 1 in conjunction with some optimization. (Frederic, reported by Olivier Chapelle) * Runtime crash related to an optimization with subtensor of alloc (reported by Razvan, fixed by Frederic) * Fix dot22scalar cast of integer scalars (Justin Bayer, Frédéric, Olivier) * Fix runtime crash in gemm, dot22. FB * Fix on 32 bit computer: make sure all shapes are int64. (Olivier) * Fix to deque on python 2.4 (Olivier) * Fix crash when not using C code (or using DebugMode) (not used by default) with numpy 1.6*. Numpy has a bug in the reduction code that made it crash. (Pascal) * Crashes of blas functions (Gemv on CPU; Ger, Gemv and Gemm on GPU) when matrices had non-unit stride in both dimensions (CPU and GPU), or when matrices had negative strides (GPU only). In those cases, we are now making copies. (Pascal) * More cases supported in AdvancedIncSubtensor1. (Olivier D.) * Fix crash when a broadcasted constant was used as input of an elemwise Op and needed to be upcasted to match the op's output. (Reported by John Salvatier, fixed by Pascal L.) * Fixed a memory leak with shared variable (we kept a pointer to the original value) (Ian G.) Known bugs: * CAReduce with nan in inputs don't return the good output (`Ticket `_). * This is used in tensor.{max,mean,prod,sum} and in the grad of PermuteRowElements. Sandbox: * cvm interface more consistent with current linker. (James) * Now all tests pass with the linker=cvm flags. * vm linker has a callback parameter. (James) * review/finish/doc: diag/extract_diag. (Arnaud Bergeron, Frederic, Olivier) * review/finish/doc: AllocDiag/diag. (Arnaud, Frederic, Guillaume) * review/finish/doc: MatrixInverse, matrix_inverse. (Razvan) * review/finish/doc: matrix_dot. (Razvan) * review/finish/doc: det (determinent) op. (Philippe Hamel) * review/finish/doc: Cholesky determinent op. (David) * review/finish/doc: ensure_sorted_indices. (Li Yao) * review/finish/doc: spectral_radius_boud. (Xavier Glorot) * review/finish/doc: sparse sum. (Valentin Bisson) * review/finish/doc: Remove0 (Valentin) * review/finish/doc: SquareDiagonal (Eric) Sandbox New features (not enabled by default): * CURAND_RandomStreams for uniform and normal (not picklable, GPU only) (James) * New sandbox.linalg.ops.pinv(pseudo-inverse) op (Razvan) Documentation: * Many updates. (Many people) * Updates to install doc on MacOS. (Olivier) * Updates to install doc on Windows. (David, Olivier) * Doc on the Rop function (Ian) * Added how to use scan to loop with a condition as the number of iteration. (Razvan) * Added how to wrap in Theano an existing python function (in numpy, scipy, ...). (Frederic) * Refactored GPU installation of Theano. (Olivier) Others: * Better error messages in many places. (Many people) * PEP8 fixes. (Many people) * Add a warning about numpy bug when using advanced indexing on a tensor with more than 2**32 elements (the resulting array is not correctly filled and ends with zeros). (Pascal, reported by David WF) * Added Scalar.ndim=0 and ScalarSharedVariable.ndim=0 (simplify code) (Razvan) * New min_informative_str() function to print graph. (Ian) * Fix catching of exception. (Sometimes we used to catch interrupts) (Frederic, David, Ian, Olivier) * Better support for utf string. (David) * Fix pydotprint with a function compiled with a ProfileMode (Frederic) * Was broken with change to the profiler. * Warning when people have old cache entries. (Olivier) * More tests for join on the GPU and CPU. (Frederic) * Do not request to load the GPU module by default in scan module. (Razvan) * Fixed some import problems. (Frederic and others) * Filtering update. (James) * On Windows, the default compiledir changed to be local to the computer/user and not transferred with roaming profile. (Sebastian Urban) * New theano flag "on_shape_error". Defaults to "warn" (same as previous behavior): it prints a warning when an error occurs when inferring the shape of some apply node. The other accepted value is "raise" to raise an error when this happens. (Frederic) * The buidbot now raises optimization/shape errors instead of just printing a warning. (Frederic) * better pycuda tests (Frederic) * check_blas.py now accepts the shape and the number of iterations as parameter (Frederic) * Fix opt warning when the opt ShapeOpt is disabled (enabled by default) (Frederic) * More internal verification on what each op.infer_shape return. (Frederic, James) * Improved docstring and basic tests for the Tile Op (David). Reviewers (alphabetical order): * David, Frederic, Ian, James, Olivier, Razvan Theano 0.4.1 (12 August 2011) ============================= New features: * `R_op `_ macro like theano.tensor.grad * Not all tests are done yet (TODO) * Added alias theano.tensor.bitwise_{and,or,xor,not}. They are the numpy names. * Updates returned by Scan (you need to pass them to the theano.function) are now a new Updates class. That allow more check and easier work with them. The Updates class is a subclass of dict * Scan can now work in a "do while" loop style. * We scan until a condition is met. * There is a minimum of 1 iteration(can't do "while do" style loop) * The "Interactive Debugger" (compute_test_value theano flags) * Now should work with all ops (even the one with only C code) * In the past some errors were caught and re-raised as unrelated errors (ShapeMismatch replaced with NotImplemented). We don't do that anymore. * The new Op.make_thunk function(introduced in 0.4.0) is now used by constant_folding and DebugMode * Added A_TENSOR_VARIABLE.astype() as a way to cast. NumPy allows this syntax. * New BLAS GER implementation. * Insert GEMV more frequently. * Added new ifelse(scalar condition, rval_if_true, rval_if_false) Op. * This is a subset of the elemwise switch (tensor condition, rval_if_true, rval_if_false). * With the new feature in the sandbox, only one of rval_if_true or rval_if_false will be evaluated. Optimizations: * Subtensor has C code * {Inc,Set}Subtensor has C code * ScalarFromTensor has C code * dot(zeros,x) and dot(x,zeros) * IncSubtensor(x, zeros, idx) -> x * SetSubtensor(x, x[idx], idx) -> x (when x is a constant) * subtensor(alloc,...) -> alloc * Many new scan optimization * Lower scan execution overhead with a Cython implementation * Removed scan double compilation (by using the new Op.make_thunk mechanism) * Certain computations from the inner graph are now Pushed out into the outer graph. This means they are not re-comptued at every step of scan. * Different scan ops get merged now into a single op (if possible), reducing the overhead and sharing computations between the two instances GPU: * PyCUDA/CUDAMat/Gnumpy/Theano bridge and `documentation `_. * New function to easily convert pycuda GPUArray object to and from CudaNdarray object * Fixed a bug if you crated a view of a manually created CudaNdarray that are view of GPUArray. * Removed a warning when nvcc is not available and the user did not requested it. * renamed config option cuda.nvccflags -> nvcc.flags * Allow GpuSoftmax and GpuSoftmaxWithBias to work with bigger input. Bugs fixed: * In one case an AdvancedSubtensor1 could be converted to a GpuAdvancedIncSubtensor1 insted of GpuAdvancedSubtensor1. It probably didn't happen due to the order of optimizations, but that order is not guaranteed to be the same on all computers. * Derivative of set_subtensor was wrong. * Derivative of Alloc was wrong. Crash fixed: * On an unusual Python 2.4.4 on Windows * When using a C cache copied from another location * On Windows 32 bits when setting a complex64 to 0. * Compilation crash with CUDA 4 * When wanting to copy the compilation cache from a computer to another * This can be useful for using Theano on a computer without a compiler. * GPU: * Compilation crash fixed under Ubuntu 11.04 * Compilation crash fixed with CUDA 4.0 Know bug: * CAReduce with nan in inputs don't return the good output (`Ticket `_). * This is used in tensor.{max,mean,prod,sum} and in the grad of PermuteRowElements. * This is not a new bug, just a bug discovered since the last release that we didn't had time to fix. Deprecation (will be removed in Theano 0.5, warning generated if you use them): * The string mode (accepted only by theano.function()) FAST_RUN_NOGC. Use Mode(linker='c|py_nogc') instead. * The string mode (accepted only by theano.function()) STABILIZE. Use Mode(optimizer='stabilize') instead. * scan interface change: * The use of `return_steps` for specifying how many entries of the output scan has been deprecated * The same thing can be done by applying a subtensor on the output return by scan to select a certain slice * The inner function (that scan receives) should return its outputs and updates following this order: [outputs], [updates], [condition]. One can skip any of the three if not used, but the order has to stay unchanged. * tensor.grad(cost, wrt) will return an object of the "same type" as wrt (list/tuple/TensorVariable). * Currently tensor.grad return a type list when the wrt is a list/tuple of more than 1 element. Decrecated in 0.4.0(Reminder, warning generated if you use them): * Dividing integers with / is deprecated: use // for integer division, or cast one of the integers to a float type if you want a float result (you may also change this behavior with config.int_division). * tag.shape attribute deprecated (#633) * CudaNdarray_new_null is deprecated in favour of CudaNdarray_New Sandbox: * MRG random generator now implements the same casting behavior as the regular random generator. Sandbox New features(not enabled by default): * New Linkers (theano flags linker={vm,cvm}) * The new linker allows lazy evaluation of the new ifelse op, meaning we compute only the true or false branch depending of the condition. This can speed up some types of computation. * Uses a new profiling system (that currently tracks less stuff) * The cvm is implemented in C, so it lowers Theano's overhead. * The vm is implemented in python. So it can help debugging in some cases. * In the future, the default will be the cvm. * Some new not yet well tested sparse ops: theano.sparse.sandbox.{SpSum, Diag, SquareDiagonal, ColScaleCSC, RowScaleCSC, Remove0, EnsureSortedIndices, ConvolutionIndices} Documentation: * How to compute the `Jacobian, Hessian, Jacobian times a vector, Hessian times a vector `_. * Slide for a 3 hours class with exercises that was done at the HPCS2011 Conference in Montreal. Others: * Logger name renamed to be consistent. * Logger function simplified and made more consistent. * Fixed transformation of error by other not related error with the compute_test_value Theano flag. * Compilation cache enhancements. * Made compatible with NumPy 1.6 and SciPy 0.9 * Fix tests when there was new dtype in NumPy that is not supported by Theano. * Fixed some tests when SciPy is not available. * Don't compile anything when Theano is imported. Compile support code when we compile the first C code. * Python 2.4 fix: * Fix the file theano/misc/check_blas.py * For python 2.4.4 on Windows, replaced float("inf") with numpy.inf. * Removes useless inputs to a scan node * Beautification mostly, making the graph more visible. Such inputs would appear as a consequence of other optimizations Core: * there is a new mechanism that lets an Op permit that one of its inputs to be aliased to another destroyed input. This will generally result in incorrect calculation, so it should be used with care! The right way to use it is when the caller can guarantee that even if these two inputs look aliased, they actually will never overlap. This mechanism can be used, for example, by a new alternative approach to implementing Scan. If an op has an attribute called "destroyhandler_tolerate_aliased" then this is what's going on. IncSubtensor is thus far the only Op to use this mechanism.Mechanism Theano 0.4.0 (2011-06-13) ========================= Change in output memory storage for Ops: If you implemented custom Ops, with either C or Python implementation, this will concern you. The contract for memory storage of Ops has been changed. In particular, it is no longer guaranteed that output memory buffers are either empty, or allocated by a previous execution of the same Op. Right now, here is the situation: * For Python implementation (perform), what is inside output_storage may have been allocated from outside the perform() function, for instance by another node (e.g., Scan) or the Mode. If that was the case, the memory can be assumed to be C-contiguous (for the moment). * For C implementations (c_code), nothing has changed yet. In a future version, the content of the output storage, both for Python and C versions, will either be NULL, or have the following guarantees: * It will be a Python object of the appropriate Type (for a Tensor variable, a numpy.ndarray, for a GPU variable, a CudaNdarray, for instance) * It will have the correct number of dimensions, and correct dtype However, its shape and memory layout (strides) will not be guaranteed. When that change is made, the config flag DebugMode.check_preallocated_output will help you find implementations that are not up-to-date. Deprecation: * tag.shape attribute deprecated (#633) * CudaNdarray_new_null is deprecated in favour of CudaNdarray_New * Dividing integers with / is deprecated: use // for integer division, or cast one of the integers to a float type if you want a float result (you may also change this behavior with config.int_division). * Removed (already deprecated) sandbox/compile module * Removed (already deprecated) incsubtensor and setsubtensor functions, inc_subtensor and set_subtensor are to be used instead. Bugs fixed: * In CudaNdarray.__{iadd,idiv}__, when it is not implemented, return the error. * THEANO_FLAGS='optimizer=None' now works as expected * Fixed memory leak in error handling on GPU-to-host copy * Fix relating specifically to Python 2.7 on Mac OS X * infer_shape can now handle Python longs * Trying to compute x % y with one or more arguments being complex now raises an error. * The output of random samples computed with uniform(..., dtype=...) is guaranteed to be of the specified dtype instead of potentially being of a higher-precision dtype. * The perform() method of DownsampleFactorMax did not give the right result when reusing output storage. This happen only if you use the Theano flags 'linker=c|py_nogc' or manually specify the mode to be 'c|py_nogc'. Crash fixed: * Work around a bug in gcc 4.3.0 that make the compilation of 2d convolution crash. * Some optimizations crashed when the "ShapeOpt" optimization was disabled. Optimization: * Optimize all subtensor followed by subtensor. GPU: * Move to the gpu fused elemwise that have other dtype then float32 in them (except float64) if the input and output are float32. * This allow to move elemwise comparisons to the GPU if we cast it to float32 after that. * Implemented CudaNdarray.ndim to have the same interface in ndarray. * Fixed slowdown caused by multiple chained views on CudaNdarray objects * CudaNdarray_alloc_contiguous changed so as to never try to free memory on a view: new "base" property * Safer decref behaviour in CudaNdarray in case of failed allocations * New GPU implementation of tensor.basic.outer * Multinomial random variates now available on GPU New features: * ProfileMode * profile the scan overhead * simple hook system to add profiler * reordered the output to be in the order of more general to more specific * DebugMode now checks Ops with different patterns of preallocated memory, configured by config.DebugMode.check_preallocated_output. * var[vector of index] now work, (grad work recursively, the direct grad work inplace, gpu work) * limitation: work only of the outer most dimensions. * New way to test the graph as we build it. Allow to easily find the source of shape mismatch error: `http://deeplearning.net/software/theano/tutorial/debug_faq.html#interactive-debugger`__ * cuda.root inferred if nvcc is on the path, otherwise defaults to /usr/local/cuda * Better graph printing for graphs involving a scan subgraph * Casting behavior can be controlled through config.cast_policy, new (experimental) mode. * Smarter C module cache, avoiding erroneous usage of the wrong C implementation when some options change, and avoiding recompiling the same module multiple times in some situations. * The "theano-cache clear" command now clears the cache more thoroughly. * More extensive linear algebra ops (CPU only) that wrap scipy.linalg now available in the sandbox. * CUDA devices 4 - 16 should now be available if present. * infer_shape support for the View op, better infer_shape support in Scan * infer_shape supported in all case of subtensor * tensor.grad now gives an error by default when computing the gradient wrt a node that is disconnected from the cost (not in the graph, or no continuous path from that op to the cost). * New tensor.isnan and isinf functions. Documentation: * Better commenting of cuda_ndarray.cu * Fixes in the scan documentation: add missing declarations/print statements * Better error message on failed __getitem__ * Updated documentation on profile mode * Better documentation of testing on Windows * Better documentation of the 'run_individual_tests' script Unit tests: * More strict float comparaison by default * Reuse test for subtensor of tensor for gpu tensor(more gpu test) * Tests that check for aliased function inputs and assure appropriate copying (#374) * Better test of copies in CudaNdarray * New tests relating to the new base pointer requirements * Better scripts to run tests individually or in batches * Some tests are now run whenever cuda is available and not just when it has been enabled before * Tests display less pointless warnings. Other: * Correctly put the broadcast flag to True in the output var of a Reshape op when we receive an int 1 in the new shape. * pydotprint: high contrast mode is now the default, option to print more compact node names. * pydotprint: How trunk label that are too long. * More compact printing (ignore leading "Composite" in op names) Theano 0.3.1 (2011-02-21) ========================= Deprecation: * The theano shared variable attribute `value` is deprecated, use `get_value()` or `set_value()`! See http://deeplearning.net/software/theano/tutorial/aliasing.html Bugs fixed: * The random number generator in theano/sandbox/rng_mrg.py did not always return the same sequence of number on the CPU and GPU. * In some cases, there was a (possibly large) fraction of non-random garbage in the returned sequence. * In python mode (not the default mode) when input of elemwise operation was an empty ndarray, we were not returning an empty ndarray. * Scan cached the number of steps. This caused no problem because each time you called scan the number of steps would got refreshed. The problem was when you called ScanGrad which would use the cached number of steps without refreshing it. To be affected by this bug, one would have to compile two graph, one that would contain a Scan and the other the corresponding GradScan, and call the first function to cache the number of steps, and then call the second function with a different number of steps. * In GpuConv, errors in conv_patch_stack_reduce when the entire kernel doesn't fit into shared memory. The error was not found before as the impact was less then the relative tolerance of 1e-3. Now the relative tolerance is 1e-5. Crash fixed: * Add a feature to not have an exception that makes Theano crash when taking the gradient on DimShuffle in some particular case. * Compilation crash for GpuElemwise with tensor with high number of dimensions (~6 or more). * Disabled C code generator that make gcc crash on complex type. * Crash in optimization when an Op has no input. * Output shape is now computed correctly for matrix-vector multiplication on GPU. * In Scan, when using numbers as inputs, not symbolic variables. * In GradScan, when there is only 1 inputs in the Scan. * In GpuSum, bug in calculation of n_blocks for the 10 pattern. (Sum on the row of a matrix) * Some segfault at exit with GPU code. Optimization: * New SpecifyShape op that allow to pass more shape info in the graph. * Speed up gemv by a work around scipy gemv slowness when the matrix is in C order (the default). * Remove join of only 1 element. * During optimization, consider one more case in get_constant_value. GPU: * cuda_shared.value = X now works inplace! * cuda_shared_var.set_value(new_ndarray) will overwrite the old value inplace in the most common case. * Allow to create a CudaNdarraySharedVariable from a CudaNdarray. * New init_gpu_device theano flags. * Fuse GpuElemwise more often (in the case where there are so many inputs that fusing them all would bust the 256 bytes limit of parameter to gpu function). * CPU join of only 1 element that was not moved to the GPU. New features: * tensor.reshape now makes dimensions of length 1 broadcastable. * tensor.prod now implements the gradient. * DebugMode now warns if an Op declared itself as returning a view of the input but did not do so. * This behaviour is a problem, because it can block other Ops from being inplace on the same inputs. This could lower the reuse of memory. * Sparse.structured_dot now works when both matrices are sparse * Sparse type is now supported by the shape op, and the ShapeFeature optimizer works correctly with them. * New 3D convolution ops, with CPU and GPU implementations. * New colors in pydotprint. Documentation: * Documented lib.amdlibm and (new) init_gpu_device config variables. * A new page (was done for 0.3 but an error was hiding it on the web page) on the memory aliasing contract of Theano. * Revision to the Windows installation instructions. * The cuda documentation is now generated on the web server. * Better documentation of .theanorc and its sections. Unit tests: * Stop usage of deprecated functions or syntax in the unit tests. * Better testing of GPU convolution nets. * Make more tests able to use different random seeds. * Tests of sparse now use default mode, not a hard-coded one. * Remove some tests of unimplemented features. Other: * The name of compiledir now includes the Python version to make it easier for people with many Python versions * Added theano.tensor.std as a shortcut to sqrt(var(input=input, axis=axis)). * Whitespace, tabulation and indentation clean-up in the code. * Better detection of memory sharing between variables. Theano 0.3 (2010-11-23) ======================= This is the first major release of Theano since 0.1. Version 0.2 development started internally but it was never advertised as a release. There have been so many changes since 0.1 that we have lost track of many of them. Below is a *partial* list of changes since 0.1. * GPU code using NVIDIA's CUDA framework is now generated for many Ops. * Some interface changes since 0.1: * A new "shared variable" system to allow reusing memory space between Theano functions. * A new memory contract has been formally written for Theano, for people who want to minimize memory copies. * The old module system has been deprecated. * By default, inputs to a Theano function will not be silently downcasted (e.g. from float64 to float32). * An error is now raised when using the result of logical operation on Theano variable in an 'if' (i.e. an implicit call to __nonzeros__). * An error is now raised when we receive a non-aligned ndarray as input to a function (this is not supported). * An error is raised when the list of dimensions passed to dimshuffle() contains duplicates or is otherwise not sensible. * Call NumPy BLAS bindings for gemv operations in addition to the already supported gemm. * If gcc is unavailable at import time, Theano now falls back to a Python-based emulation mode after raising a warning. * An error is now raised when tensor.grad is called on a non-scalar Theano variable (in the past we would implicitly do a sum on the tensor to make it a scalar). * Added support for "erf" and "erfc" functions. * The current default value of the parameter axis of theano.{max,min,argmax,argmin,max_and_argmax} is deprecated. We now use the default NumPy behavior of operating on the entire tensor. * Theano is now available from PyPI and installable through "easy_install" or "pip". Theano 0.1 ========== *Release date: 2009-04-02* What works ---------- - building symbolic expression. - arranging symbolic expressions into Modules so that multiple functions can work on the same data. - symbolic gradient descent. - graph optimization. - compilation to C for many kinds of expression. - a debugging mode that checks that your expression results are correct, using a variety of sanity checks. What's missing? --------------- - An algorithm library. We're missing a library of examples and standard component implementations. Some examples will find their way into the Theano repo, but standard algorithms will go into the 'pylearn' project (toolbox style). Now that we have a stable foundation, we can reach a consensus on style for algorithms. Theano-rel-0.9.0/ISSUE_TEMPLATE.md000066400000000000000000000012071306376074600162370ustar00rootroot00000000000000If you have any questions on Theano, please ask your questions in either [theano-user mailing list](https://groups.google.com/forum/#!forum/theano-users) or [stackoverflow](http://stackoverflow.com/) with the "theano" tag. Use issue only to report bugs or to ask for new features in Theano. Before reporting a bug, update to Theano development version. Maybe it is already fixed. If not, tell us the Theano flags and Theano version that generate the problem. If it is a regression, can do a "git bisect" to idenfy when the problem appeard. This really help fix it rapidly. If you add a feature request, describe in which case it will be useful.Theano-rel-0.9.0/LICENSE.txt000077700000000000000000000000001306376074600177402doc/LICENSE.txtustar00rootroot00000000000000Theano-rel-0.9.0/MANIFEST.in000066400000000000000000000003511306376074600152670ustar00rootroot00000000000000global-include *.txt global-include *.c global-include *.cu global-include *.cuh global-include *.cpp global-include *.h global-include *.sh global-include *.pkl recursive-include doc include bin/theano-cache include bin/theano-nose Theano-rel-0.9.0/NEWS.txt000066400000000000000000000165751306376074600150650ustar00rootroot00000000000000============= Release Notes ============= Theano 0.9.0 (20th of March, 2017) ================================== This is a final release of Theano, version ``0.9.0``, with a lot of new features, interface changes, improvements and bug fixes. We recommend that everybody update to this version. Highlights (since 0.8.0): - Better Python 3.5 support - Better numpy 1.12 support - Conda packages for Mac, Linux and Windows - Support newer Mac and Windows versions - More Windows integration: - Theano scripts (``theano-cache`` and ``theano-nose``) now works on Windows - Better support for Windows end-lines into C codes - Support for space in paths on Windows - Scan improvements: - More scan optimizations, with faster compilation and gradient computation - Support for checkpoint in scan (trade off between speed and memory usage, useful for long sequences) - Fixed broadcast checking in scan - Graphs improvements: - More numerical stability by default for some graphs - Better handling of corner cases for theano functions and graph optimizations - More graph optimizations with faster compilation and execution - smaller and more readable graph - New GPU back-end: - Removed warp-synchronous programming to get good results with newer CUDA drivers - More pooling support on GPU when cuDNN isn't available - Full support of ignore_border option for pooling - Inplace storage for shared variables - float16 storage - Using PCI bus ID of graphic cards for a better mapping between theano device number and nvidia-smi number - Fixed offset error in ``GpuIncSubtensor`` - Less C code compilation - Added support for bool dtype - Updated and more complete documentation - Bug fixes related to merge optimizer and shape inference - Lot of other bug fixes, crashes fixes and warning improvements A total of 123 people contributed to this release since 0.8.0, see list below. Interface changes: - Merged ``CumsumOp/CumprodOp`` into ``CumOp`` - In MRG module: - Replaced method ``multinomial_wo_replacement()`` with new method ``choice()`` - Random generator now tries to infer the broadcast pattern of its output - New pooling interface - Pooling parameters can change at run time - Moved ``softsign`` out of sandbox to ``theano.tensor.nnet.softsign`` - Using floatX dtype when converting empty list/tuple - ``Roll`` make the shift be modulo the size of the axis we roll on - ``round()`` default to the same as NumPy: half_to_even Convolution updates: - Support of full and half modes for 2D and 3D convolutions including in ``conv3d2d`` - Allowed pooling of empty batch - Implement ``conv2d_transpose`` convenience function - Multi-cores convolution and pooling on CPU - New abstract 3d convolution interface similar to the 2d convolution interface - Dilated convolution GPU: - cuDNN: support versoin 5.1 and wrap batch normalization (2d and 3d) and RNN functions - Multiple-GPU, synchrone update (via platoon, use NCCL) - Gemv(matrix-vector product) speed up for special shape - cublas gemv workaround when we reduce on an axis with a dimensions size of 0 - Warn user that some cuDNN algorithms may produce unexpected results in certain environments for convolution backward filter operations - ``GPUMultinomialFromUniform`` op now supports multiple dtypes - Support for ``MaxAndArgMax`` for some axis combination - Support for solve (using cusolver), erfinv and erfcinv - Implemented ``GpuAdvancedSubtensor`` New features: - ``OpFromGraph`` now allows gradient overriding for every input - Added Abstract Ops for batch normalization that use cuDNN when available and pure Theano CPU/GPU alternatives otherwise - Added gradient of solve, tensorinv (CPU), tensorsolve (CPU), searchsorted (CPU), DownsampleFactorMaxGradGrad (CPU) - Added Multinomial Without Replacement - Allowed partial evaluation of compiled function - More Rop support - Indexing support ellipsis: ``a[..., 3]```, ``a[1,...,3]`` - Added ``theano.tensor.{tensor5,dtensor5, ...}`` - compiledir_format support device - Added New Theano flag ``conv.assert_shape`` to check user-provided shapes at runtime (for debugging) - Added new Theano flag ``cmodule.age_thresh_use`` - Added new Theano flag ``cuda.enabled`` - Added new Theano flag ``nvcc.cudafe`` to enable faster compilation and import with old CUDA back-end - Added new Theano flag ``print_global_stats`` to print some global statistics (time spent) at the end - Added new Theano flag ``profiling.ignore_first_call``, useful to profile the new gpu back-end - remove ProfileMode (use Theano flag ``profile=True`` instead) Others: - Split op now has C code for CPU and GPU - ``theano-cache list`` now includes compilation times - Speed up argmax only on GPU (without also needing the max) - More stack trace in error messages - Speed up cholesky grad - ``log(sum(exp(...)))`` now get stability optimized Other more detailed changes: - Added Jenkins (gpu tests run on pull requests in addition to daily buildbot) - Removed old benchmark directory and other old files not used anymore - Use of 64-bit indexing in sparse ops to allow matrix with more then 2\ :sup:`31`\ -1 elements - Allowed more then one output to be an destructive inplace - More support of negative axis - Added the keepdims parameter to the norm function - Make scan gradient more deterministic Commiters since 0.8.0: - Frederic Bastien - Arnaud Bergeron - Pascal Lamblin - Steven Bocco - Ramana Subramanyam - Simon Lefrancois - Gijs van Tulder - Benjamin Scellier - khaotik - Chiheb Trabelsi - Chinnadhurai Sankar - Cesar Laurent - Reyhane Askari - Mohammad Pezeshki - Alexander Matyasko - Alexandre de Brebisson - Mathieu Germain - Nan Rosemary Ke - Pierre Luc Carrier - Olivier Mastropietro - Thomas George - Saizheng Zhang - Iulian Vlad Serban - Francesco Visin - Caglar - Faruk Ahmed - Harm de Vries - Samira Shabanian - Vincent Dumoulin - Nicolas Ballas - Jakub Sygnowski - Jan Schlüter - Samira Ebrahimi Kahou - Mikhail Korobov - Fei Wang - Kv Manohar - Jesse Livezey - Kelvin Xu - Matt Graham - Ruslana Makovetsky - Sina Honari - Bryn Keller - Ciyong Chen - Vitaliy Kurlin - Zhouhan LIN - Gokula Krishnan - Kumar Krishna Agrawal - Ozan Çağlayan - Vincent Michalski - affanv14 - Amjad Almahairi - Ray Donnelly - Tim Cooijmans - happygds - mockingjamie - Christos Tsirigotis - Florian Bordes - Ilya Kulikov - RadhikaG - Taesup (TS) Kim - Ying Zhang - Anton Chechetka - Karthik Karanth - Kirill Bobyrev - Rebecca N. Palmer - Yang Zhang - Yaroslav Ganin - Jonas Degrave - Liwei Cai - Lucas Beyer - Michael Harradon - Morgan Stuart - Tim Gasper - Xavier Bouthillier - p - texot - Andrés Gottlieb - Ben Poole - Bhavishya Pohani - Carl Thomé - David Bau - Dimitar Dimitrov - Evelyn Mitchell - Fei Zhan - Fuchai - Fábio Perez - Gennadiy Tupitsin - Gilles Louppe - Greg Ciccarelli - He - Huan Zhang - Kaixhin - Kevin Keraudren - Maltimore - Marc-Alexandre Cote - Marco - Marius F. Killinger - Martin Drawitsch - Maxim Kochurov - Micah Bojrab - Neil - Nizar Assaf - Rithesh Kumar - Rizky Luthfianto - Robin Millette - Roman Ring - Sander Dieleman - Sebastin Santy - Shawn Tan - Wazeer Zulfikar - Wojciech Głogowski - Yann N. Dauphin - gw0 [http://gw.tnode.com/] - hexahedria - hsintone - jakirkham - joncrall - root - superantichrist - tillahoffmann - valtron - wazeerzulfikar - you-n-g Theano-rel-0.9.0/NEWS_DEV.txt000066400000000000000000000041251306376074600155470ustar00rootroot00000000000000.. _NEWS_DEV: =================== DRAFT Release Notes =================== git log -p rel-0.9.0... |grep Merge|grep '#[0123456789]' |cut -f 8 -d ' ' | sed 's\#\* https://github.com/Theano/Theano/pull/\' # Commit count per user git shortlog -sn rel-0.9.0.. # docker? TODO: better Theano conv doc # NB: Following notes contains infos since 0.9.0. Highlights: - Speed up graph toposort algorithm - Speed up Theano scan compilation and gradient computation - Added meaningful message when missing inputs to scan - Bug fixes related to Debug mode - New GPU back-end: - Added useful stats for GPU in profile mode - Added documentation for GPU float16 ops Interface changes: - Changed ``grad()`` method to ``L_op`` in ops that need the outputs to compute gradient - Merged duplicated diagonal functions into two ops: ``ExtractDiag`` (extract a diagonal to a vector), and ``AllocDiag`` (set a vector as a diagonal of an empty array) Convolution updates: - Extended Theano flag ``dnn.enabled`` with new option ``no_check`` to help speed up cuDNN importation GPU: - ... New features: - Added scalar and elemwise ops for modified Bessel function of order 0 and 1 from ``scipy.special`` Others: - ... Other more detailed changes: - Removed useless warning when profile is manually disabled - Added tests for abstract conv ALL THE PR BELLOW HAVE BEEN CHECKED * https://github.com/Theano/Theano/pull/5715 * https://github.com/Theano/Theano/pull/5502 * https://github.com/Theano/Theano/pull/5533 * https://github.com/Theano/Theano/pull/5660 * https://github.com/Theano/Theano/pull/5682 * https://github.com/Theano/Theano/pull/5704 * https://github.com/Theano/Theano/pull/5687 * https://github.com/Theano/Theano/pull/5455 * https://github.com/Theano/Theano/pull/5667 * https://github.com/Theano/Theano/pull/5554 * https://github.com/Theano/Theano/pull/5486 * https://github.com/Theano/Theano/pull/5567 * https://github.com/Theano/Theano/pull/5615 * https://github.com/Theano/Theano/pull/5672 * https://github.com/Theano/Theano/pull/5524 Theano Development version ========================== NEWS.txt: Theano-rel-0.9.0/README.txt000066400000000000000000000030031306376074600152240ustar00rootroot00000000000000To 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/ Related Projects: https://github.com/Theano/Theano/wiki/Related-projects It is recommended that you look at the documentation on the website, as it will be more current than the documentation included with the package. In order to build the documentation yourself, you will need sphinx. Issue the following command: python ./doc/scripts/docgen.py Documentation is built into html/ The PDF of the documentation can be found at html/theano.pdf DIRECTORY LAYOUT Theano (current directory) is the distribution directory. * Theano/theano contains the package * Theano/theano has several submodules: * gof + compile are the core * scalar depends upon core * tensor depends upon scalar * sparse depends upon tensor * sandbox can depend on everything else * Theano/examples are copies of the example found on the wiki * Theano/benchmark and Theano/examples are in the distribution, but not in the Python package * Theano/bin contains executable scripts that are copied to the bin folder when the Python package is installed * Tests are distributed and are part of the package, i.e. fall in the appropriate submodules * Theano/doc contains files and scripts used to generate the documentation * Theano/html is where the documentation will be generated Theano-rel-0.9.0/Theano.pyproj000066400000000000000000000267601306376074600162300ustar00rootroot00000000000000 Debug 2.0 {b67d762d-0020-4e02-9ddf-7db4f89b1dd3} . . . Theano Theano False 2af0f10d-7135-4994-9156-5d01c9c11b7e 2.7 true false true false Theano-rel-0.9.0/Theano.sln000066400000000000000000000013171306376074600154700ustar00rootroot00000000000000 Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "Theano", "Theano.pyproj", "{B67D762D-0020-4E02-9DDF-7DB4F89B1DD3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B67D762D-0020-4E02-9DDF-7DB4F89B1DD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B67D762D-0020-4E02-9DDF-7DB4F89B1DD3}.Release|Any CPU.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal Theano-rel-0.9.0/bin/000077500000000000000000000000001306376074600143025ustar00rootroot00000000000000Theano-rel-0.9.0/bin/__init__.py000066400000000000000000000000001306376074600164010ustar00rootroot00000000000000Theano-rel-0.9.0/bin/theano-cache000077500000000000000000000000761306376074600165520ustar00rootroot00000000000000#!/usr/bin/env python import theano_cache theano_cache.main() Theano-rel-0.9.0/bin/theano-nose000077500000000000000000000000741306376074600164510ustar00rootroot00000000000000#!/usr/bin/env python import theano_nose theano_nose.main() Theano-rel-0.9.0/bin/theano_cache.py000066400000000000000000000077131306376074600172650ustar00rootroot00000000000000#!/usr/bin/env python from __future__ import print_function import logging import os import sys if sys.platform == 'win32': config_for_theano_cache_script = 'cxx=,device=cpu' theano_flags = os.environ['THEANO_FLAGS'] if 'THEANO_FLAGS' in os.environ else '' if theano_flags: theano_flags += ',' theano_flags += config_for_theano_cache_script os.environ['THEANO_FLAGS'] = theano_flags 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') def print_help(exit_status): if exit_status: print('command "%s" not recognized' % (' '.join(sys.argv))) print('Type "theano-cache" to print the cache location') print('Type "theano-cache help" to print this help') print('Type "theano-cache clear" to erase the cache') print('Type "theano-cache list" to print the cache content') print('Type "theano-cache unlock" to unlock the cache directory') print('Type "theano-cache cleanup" to delete keys in the old ' 'format/code version') print('Type "theano-cache purge" to force deletion of the cache directory') print('Type "theano-cache basecompiledir" ' 'to print the parent of the cache directory') print('Type "theano-cache basecompiledir list" ' 'to print the content of the base compile dir') print('Type "theano-cache basecompiledir purge" ' 'to remove everything in the base compile dir, ' 'that is, erase ALL cache directories') sys.exit(exit_status) def main(): if len(sys.argv) == 1: print(config.compiledir) elif len(sys.argv) == 2: if sys.argv[1] == 'help': print_help(exit_status=0) if sys.argv[1] == 'clear': # We skip the refresh on module cache creation because the refresh will # be done when calling clear afterwards. cache = get_module_cache(init_args=dict(do_refresh=False)) cache.clear(unversioned_min_age=-1, clear_base_files=True, delete_if_problem=True) # Print a warning if some cached modules were not removed, so that the # user knows he should manually delete them, or call # theano-cache purge, # to properly clear the cache. items = [item for item in sorted(os.listdir(cache.dirname)) if item.startswith('tmp')] if items: _logger.warning( 'There remain elements in the cache dir that you may ' 'need to erase manually. The cache dir is:\n %s\n' 'You can also call "theano-cache purge" to ' 'remove everything from that directory.' % config.compiledir) _logger.debug('Remaining elements (%s): %s' % (len(items), ', '.join(items))) elif sys.argv[1] == 'list': theano.gof.compiledir.print_compiledir_content() elif sys.argv[1] == 'cleanup': theano.gof.compiledir.cleanup() cache = get_module_cache(init_args=dict(do_refresh=False)) cache.clear_old() elif sys.argv[1] == 'unlock': theano.gof.compilelock.force_unlock() print('Lock successfully removed!') elif sys.argv[1] == 'purge': theano.gof.compiledir.compiledir_purge() elif sys.argv[1] == 'basecompiledir': # Simply print the base_compiledir print(theano.config.base_compiledir) else: print_help(exit_status=1) elif len(sys.argv) == 3 and sys.argv[1] == 'basecompiledir': if sys.argv[2] == 'list': theano.gof.compiledir.basecompiledir_ls() elif sys.argv[2] == 'purge': theano.gof.compiledir.basecompiledir_purge() else: print_help(exit_status=1) else: print_help(exit_status=1) if __name__ == '__main__': main() Theano-rel-0.9.0/bin/theano_nose.py000066400000000000000000000253631306376074600171670ustar00rootroot00000000000000#!/usr/bin/env python """ This script should behave the same as the `nosetests` command. The reason for its existence is that on some systems, it may not be obvious to find where nosetests is installed in order to run it in a different process. It is also used to load the KnownFailure plugin, in order to hide KnownFailureTests error messages. Use --without-knownfailure to disable that plugin. `run_tests_in_batch.py` will in turn call back this script in another process. """ from __future__ import print_function __authors__ = "Olivier Delalleau, Pascal Lamblin, Eric Larsen" __contact__ = "delallea@iro" import logging _logger = logging.getLogger('theano.bin.theano-nose') import os import nose import textwrap import sys from nose.plugins import Plugin def main_function(): # Handle the --theano arguments if "--theano" in sys.argv: i = sys.argv.index("--theano") import theano sys.argv[i] = theano.__path__[0] # Many Theano tests suppose device=cpu, so we need to raise an # error if device==gpu. # I don't know how to do this check only if we use theano-nose on # Theano tests. So I make an try..except in case the script get # reused elsewhere. # We should not import theano before call nose.main() # As this cause import problem with nosetests. # Should we find a way to don't modify sys.path? if not os.path.exists('theano/__init__.py'): try: from theano import config if config.device != "cpu": raise ValueError("Theano tests must be run with device=cpu." " This will also run GPU tests when possible.\n" " If you want GPU-related tests to run on a" " specific GPU device, and not the default one," " you should use the init_gpu_device theano flag.") except ImportError: pass # Handle --batch[=n] arguments batch_args = [arg for arg in sys.argv if arg.startswith('--batch')] for arg in batch_args: sys.argv.remove(arg) batch_size = None if len(batch_args): if len(batch_args) > 1: _logger.warn( 'Multiple --batch arguments detected, using the last one ' 'and ignoring the first ones.') batch_arg = batch_args[-1] elems = batch_arg.split('=', 1) if len(elems) == 2: batch_size = int(elems[1]) # Handle the --debug-batch argument. display_batch_output = False if '--debug-batch' in sys.argv: if not batch_args: raise AssertionError( 'You can only use the --debug-batch argument with the ' '--batch[=n] option') while '--debug-batch' in sys.argv: sys.argv.remove('--debug-batch') sys.argv += ['--verbose', '--nocapture', '--detailed-errors'] display_batch_output = True # Handle --time_prof arguments time_prof_args = [arg for arg in sys.argv if arg=='--time-profile'] for arg in time_prof_args: sys.argv.remove(arg) # Time-profiling and batch modes if time_prof_args or batch_args: from theano.tests import run_tests_in_batch return run_tests_in_batch.main( theano_nose=os.path.realpath(__file__), batch_size=batch_size, time_profile=bool(time_prof_args), display_batch_output=display_batch_output) # Non-batch mode. addplugins = [] # We include KnownFailure plugin by default, unless # it is disabled by the "--without-knownfailure" arg. if '--without-knownfailure' not in sys.argv: try: from numpy.testing.noseclasses import KnownFailure addplugins.append(KnownFailure()) except ImportError: _logger.warn( 'KnownFailure plugin from NumPy could not be imported. ' 'Use --without-knownfailure to disable this warning.') else: sys.argv.remove('--without-knownfailure') # When 'theano-nose' is called-back under the time-profile option, an # instance of the custom Nosetests plugin class 'DisabDocString' (see # below) is loaded. The latter ensures that the test name will not be # replaced in display by the first line of the documentation string. if '--disabdocstring' in sys.argv: addplugins.append(DisabDocString()) try: if addplugins: ret = nose.main(addplugins=addplugins) else: ret = nose.main() return ret except TypeError as e: if "got an unexpected keyword argument 'addplugins'" in e.message: # This means nose is too old and does not support plugins _logger.warn( 'KnownFailure plugin from NumPy can\'t' ' be used as nosetests is too old. ' 'Use --without-knownfailure to disable this warning.') nose.main() else: raise def help(): help_msg = """ This script behaves mostly the same as the `nosetests` command. The main difference is that it loads automatically the KnownFailure plugin, in order to hide KnownFailureTests error messages. It also supports executing tests by batches. Local options: --help, -h: Displays this help. --batch[=n]: If specified without option '--time-profile', do not run all the tests in one run, but split the execution in batches of `n` tests each. Default n is 100. --time-profile: Each test will be run and timed separately and the results will be deposited in the files 'timeprof_sort', 'timeprof_nosort' and 'timeprof_rawlog' in the current directory. If the '--batch[=n]' option is also specified, notification of the progresses will be made to standard output after every group of n tests. Otherwise, notification will occur after every group of 100 tests. The files 'timeprof_sort' and 'timeprof_nosort' both contain one record for each test and comprise the following fields: - test running-time - nosetests sequential test number - test name - name of class to which test belongs (if any), otherwise full information is contained in test name - test outcome ('OK', 'SKIPPED TEST', 'FAILED TEST' or 'FAILED PARSING') In 'timeprof_sort', test records are sorted according to running-time whereas in 'timeprof_nosort' records are reported according to sequential number. The former classification is the main information source for time-profiling. Since tests belonging to same or close classes and files have close sequential, the latter may be used to identify duration patterns among the tests numbers. A full log is also saved as 'timeprof_rawlog'. --without-knownfailure: Do not load the KnownFailure plugin. --theano: This parameter is replaced with the path to the theano library. As theano-nose is a wrapper to nosetests, it expects a path to the tests to run. If you do not know where theano is installed, use this option to have it inserted automatically. --debug-batch: Use this parameter to run nosetests with options '--verbose', '--nocapture' and '--detailed-errors' and show the output of nosetests during batch execution. This can be useful to debug situations where re-running only the failed tests after batch execution is not working properly. This option can only be used in conjunction with the '--batch=[n]' argument. The other options will be passed to nosetests, see ``nosetests -h``. """ print(textwrap.dedent(help_msg)) def main(): if '--help' in sys.argv or '-h' in sys.argv: help() else: result = main_function() sys.exit(result) class DisabDocString(Plugin): """ When activated, a custom Nosetests plugin created through this class will preclude automatic replacement in display of the name of the test by the first line in its documentation string. Sources: http://nose.readthedocs.org/en/latest/developing.html http://nose.readthedocs.org/en/latest/further_reading.html http://www.siafoo.net/article/54 https://github.com/nose-devs/nose/issues/294 http://python-nose.googlecode.com/svn/trunk/nose/plugins/base.py Nat Williams: https://github.com/Merino/nose-description-fixer-plugin/commit/ df94596f29c04fea8001713dd9b04bf3720aebf4 """ enabled = False # plugin disabled by default score = 2000 # high score ensures priority over other plugins def __init__(self): # 'super.__init__(self):' would have achieved exactly the same if self.name is None: self.name = self.__class__.__name__.lower() if self.enableOpt is None: self.enableOpt = ("enable_plugin_%s" % self.name.replace('-', '_')) def options(self, parser, env): env_opt = 'NOSE_WITH_%s' % self.name.upper() # latter expression to be used if plugin called from the command line parser.add_option("--%s" % self.name, # will be called with Nosetests 'main' or 'run' # function's' argument '--disabdocstring' action="store_true", dest=self.enableOpt, # the latter entails that the boolean self.enableOpt # is set to 'True' when plugin is called through a # function's argument default=env.get(env_opt), # entails that plugin will be enabled when command # line trigger 'env_opt' will be activated help="Enable plugin %s: %s [%s]" % (self.__class__.__name__, self.help(), env_opt)) def configure(self, options, conf): self.conf = conf # plugin will be enabled when called through argument self.enabled = getattr(options, self.enableOpt) def describeTest(self, test): # 'describeTest' is also called when the test result in Nosetests calls # 'test.shortDescription()' and can thus be used to alter the display. return False if __name__ == '__main__': main() Theano-rel-0.9.0/doc/000077500000000000000000000000001306376074600142775ustar00rootroot00000000000000Theano-rel-0.9.0/doc/.build/000077500000000000000000000000001306376074600154545ustar00rootroot00000000000000Theano-rel-0.9.0/doc/.build/PLACEHOLDER000066400000000000000000000000731306376074600171210ustar00rootroot00000000000000sphinx doesn't like it when this repertory isn't available Theano-rel-0.9.0/doc/.static/000077500000000000000000000000001306376074600156445ustar00rootroot00000000000000Theano-rel-0.9.0/doc/.static/PLACEHOLDER000066400000000000000000000000731306376074600173110ustar00rootroot00000000000000sphinx doesn't like it when this repertory isn't available Theano-rel-0.9.0/doc/.static/fix_rtd.css000066400000000000000000000004001306376074600200070ustar00rootroot00000000000000/* work around https://github.com/snide/sphinx_rtd_theme/issues/149 */ .rst-content table.field-list .field-body { padding-top: 8px; } .rst-versions-up { cursor: pointer; display: inline; } .wy-side-nav-search>div.version { color: white; } Theano-rel-0.9.0/doc/.static/version_switch.js000066400000000000000000000076651306376074600212660ustar00rootroot00000000000000// Create version selector for documentation top bar. (function() { var url = window.location.href; var theano_dir = 'theano'; // directory containing theano doc // Default theano version: release and development. var versions_dir = {"release": "theano", "dev": "theano_versions/dev"}; // If doc is run localy if (url.startsWith('file')) { theano_dir = 'html'; versions_dir = {"local":"html", "test":"test"}; } var root_url = url.substring(0, url.search('/' + theano_dir)) + '/'; // Regular expression to find theano version directory in URL. var version_regex = new RegExp("\\/" + theano_dir + "(_versions\\/)?([_a-zA-Z.0-9]*)\\/"); // Get current version var current_version = url.match(version_regex)[0] current_version = current_version.substring(1, current_version.length - 1) // Add current version in case versions.json is unavailable if (current_version != "theano" && current_version != "html") { ver = current_version.replace("theano_versions/", "") versions_dir[ver] = current_version } function build_vswitch() { // Build HTML string for version selector, based on ReadTheDocs theme's versions.html var vlabel = current_version.replace("theano_versions/", ""); if (vlabel == 'theano') { vlabel = 'release'; } var vswitch = ['
']; vswitch.push(''); vswitch.push(''); vswitch.push('v: ', vlabel, ' '); vswitch.push(''); vswitch.push(''); vswitch.push('
'); vswitch.push('
'); vswitch.push('
Versions
'); for (var version in versions_dir) { var new_url = url.replace(url.match(version_regex)[0], '/' + versions_dir[version] + '/'); vswitch.push('
', version, '
'); } vswitch.push('
'); vswitch.push('
'); vswitch.push('
Downloads
'); var pdf_url = root_url + current_version + "/theano.pdf" vswitch.push('
', 'PDF', '
'); vswitch.push('
'); vswitch.push('
'); vswitch.push('
On GitHub
'); var git_master = "https://github.com/Theano/Theano" vswitch.push('
', 'Fork me', '
'); vswitch.push('
'); vswitch.push('
'); vswitch.push('
'); return vswitch.join(''); } function build_vswitch_up() { // Build HTML string for version selector, based on ReadTheDocs theme's versions.html var vlabel = current_version.replace("theano_versions/", ""); if (vlabel == 'theano') { vlabel = 'release'; } else if (vlabel != "dev") { vlabel = ''; } var vswitch = ['
']; vswitch.push(''); vswitch.push(vlabel); vswitch.push(' '); vswitch.push(''); vswitch.push('
'); return vswitch.join(''); } // Create HTML for version switcher and assign to placeholder in layout.html. $(document).ready(function() { // Build default switcher $('.version_switcher_placeholder').html(build_vswitch()); $('.version_switcher_placeholder_up').html(build_vswitch_up()); // Check server for other doc versions and update switcher. if (url.startsWith('http')) { $.getJSON(root_url + 'theano_versions/versions.json', function(data){ $.each(data, function(version, dir) { versions_dir[version] = dir; }); $('.version_switcher_placeholder').html(build_vswitch()); $('.version_switcher_placeholder_up').html(build_vswitch_up()); }); } }); })(); Theano-rel-0.9.0/doc/.templates/000077500000000000000000000000001306376074600163535ustar00rootroot00000000000000Theano-rel-0.9.0/doc/.templates/PLACEHOLDER000066400000000000000000000000731306376074600200200ustar00rootroot00000000000000sphinx doesn't like it when this repertory isn't available Theano-rel-0.9.0/doc/LICENSE.txt000066400000000000000000000036211306376074600161240ustar00rootroot00000000000000.. _license: LICENSE ======= Copyright (c) 2008--2017, Theano Development Team All rights reserved. Contains code from NumPy, Copyright (c) 2005-2016, NumPy Developers. All rights reserved. Contains CnMeM under the same license with this copyright: Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. Contains frozendict code from slezica’s python-frozendict(https://github.com/slezica/python-frozendict/blob/master/frozendict/__init__.py), Copyright (c) 2012 Santiago Lezica. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Theano nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Theano-rel-0.9.0/doc/NEWS.txt000066400000000000000000000000441306376074600156120ustar00rootroot00000000000000.. _NEWS: .. include:: ../NEWS.txt Theano-rel-0.9.0/doc/acknowledgement.txt000066400000000000000000000030311306376074600202040ustar00rootroot00000000000000.. _acknowledgement: Acknowledgements ================ .. note: This page is in construction. We are missing sources. * The developers of `NumPy `_. Theano is based on its ndarray object and uses much of its implementation. * The developers of `SciPy `_. Our sparse matrix support uses their sparse matrix objects. We also reuse other parts. * All `Theano contributors `_. * All Theano users that have given us feedback. * The GPU implementation of tensordot is based on code from Tijmen Tieleman's `gnumpy `_ * The original version of the function ``cpuCount()`` in the file `theano/misc/cpucount.py` come from the project `pyprocessing `_. It is available under the same license as Theano. * Our random number generator implementation on CPU and GPU uses the MRG31k3p algorithm that is described in: P. L'Ecuyer and R. Touzin, `Fast Combined Multiple Recursive Generators with Multipliers of the form a = +/- 2^d +/- 2^e `_, Proceedings of the 2000 Winter Simulation Conference, Dec. 2000, 683--689. We were authorized by Pierre L'Ecuyer to copy/modify his Java implementation in the `SSJ `_ software and to relicense it under BSD 3-Clauses in Theano. * A better GPU memory allocator :attr:`CNMeM ` is included in Theano. It has the same license. Theano-rel-0.9.0/doc/bcast.png000066400000000000000000000623141306376074600161070ustar00rootroot00000000000000PNG  IHDR  tsBIT|d pHYs&f&f6tEXtSoftwarewww.inkscape.org< IDATxwE?$@B]HQ"ҔbDJADQDED(U ]  zo $ln{o޽<>wwݹ{v̜-H ̖3SJi.`g`c`i``Q`08&c]H"^^ǘs%4/ë%#5fFYm@$}7/<כ٧;HZ%#n0(p]\bA!i'sb{ٙ%"uuD_jftB` eU&"7$o73;`Ղ.Cҷe@.![ aP x8d=| |X1kk|FdI˗c]L+[V]́:Z0Ao[[YId3{4-^` nPIEy/Ƿ[ۨL?~mfwUPkt=)%Ilaf6!7N~)iB 3;9w#_5 TI{pĆ@.dVNAP:GFELNJ(%€lu J"0iȬO0wJ$Zge) €M2略De3IK0p21kw?NJ e) €$̞,E hII=8i[4|iGpE]S>" HO_x`40f΢f4 a@Z n| |#H5[GlJyZ0 D>vf@C9%?\>$ H?}>v7JT)#A |̞(Q`I$} ]PVA?$O_Ifvw*0 M SJ}%FWߥf6j t€A)h3U*A9]w0~\^ H $-\ ,N4JT)O|gf#(%aNDQ-]N}E|<smf)XD&}v-FW(}F l@fdDG2sX OKctyG["9S ntVA00F %€A-$ h0 AAK Z" HAa@ AD %€A-$ h0 AAK Z" HAa@  >DҼ\'lb*A5(mB)I>>1`Μsh036FҩG2I7'i@f&5)> efS SHg.yK3 } :M {ǁ񶚯obPAeR \\\ff/ҋX)1K:eu(Y R(ͅ,7S%)p-`I 3 KҬxm콲 X}IZ,]RIieҥ܌k=S"AOĄio?*Q ($U2:p`.t)53{S Ip=ߩtW2#=>͂ (H(i`[pܝ0>@AK@ٽx^zLK,j 1TlEفto @z-Y^lRvxo2()JADҲ[Egf[7rEim 4 !?2I4dlD?xN)64MIJw c3kv.  va $ ́Afv{t (k ̞8-%O>jfCW|g%i%GRMfɢ (R H3H$p=}5%&`Lh3D ٕQw4 V1T*f6 o{}ziy-A3{$q!At]o@Ȭہ? H=OIs$mfwZI3I0pAR+IJ9L(}L$mH#RK5 (J<0 xx/ 3s؅ )-`98/ k!5?wJ ,L!i~f`&OmfUAo`vϭ|;wx٫ǀx+a< Y(=VGcM`80?0>'-f6%P$Z{kfJU,J7 AAI %€A-$ h0 AAK4m@$(i"f$ /i>I GHj/IKKYHE eGҜfm GEj H7#iN` UFKs$t3$}`}$iKIJ)OIfj\x,X3~3> ^eƒ~#FIOHKYB)^Ntj2DÁ+ן]-_3 8@.@ X/fVmޜƧl^Q`{p0PҖU^wA7cfM-xus RcܹaC4'i hJ/=jn+> 6>vi{0wHrpO>}܋TNN sVNz^^㘟zƱt2@N.LnSCҦNtC% ?ܔ,W9ϟ% ˒.t=kI'JA삒Vnc{Ŏj;Mbf]`韖^, |:SYL+j;ft:mI4$sA>O6Q}v并Ru;&H Yl~-I=I%jծfoʴ|xyN3{̦)0lb.!i`]6Oՠ e_Pr׿A?dŃ'dZ R7sr{E#\)鰬Pr܁q߉͌t>\whfO4#,iy`K˪qb6pOg;9 /_笟owko8 >?]{$}1#7X oWxt:Y=q@azoHjtf}] ISPͫZm[_ql@\)in["7 X9]W4f\m8Wa$ǞVf(iZd'xc}ynmW?D.k1^9vN;r~+Fi{ z-W{IU@jx긋P$ &:⯦j/pɒn0;x>wW!ŻO_>Lne﫡b6vQ@hG5 k !fvUpI''_w$3fC|aۮw^p=}T1T0%XV\!A<``#3{!_.J1{m%-o_y7;DIŻJ7V>t*mN/nZOi,QT锎 N5C8d)BU+$7`} w)!vōVDғQ3G#o;Wx-g3kt6= Qҹ`u~dx|~zxSދjf5USukM,nĖm$, O3p5v}odV Ae*^heaݤzBN5WT-^Ӹ1U\/$+(`1IUkT{˦-z]H5w ' |[3._πD0I̕ڊ,"iturUKҎrvk/XT˧/3$}"i1I?qΓHEXKFҼNt0Ge[C([zIZwûW\a+a7o='d[۩2^f{kMWs;a᣷཯Í><65pp2^ HWf:U}196m|dΚVMx_Vr:c,xpP*3w?%#7@L u텀죩]J/پǒuR~0x5V:|*}{΀Nߩ558g.ڋҟ3pr=BILffL"% pg+f69Y*$5zHZV:8:V6Sx( 1*#.GʾGsg?*P`ƀ0Sf@D8xLSFqػ%43jc\#iM-HbN4VOQy9iEP>Z7 ngCK#prӄ-*FBf6U~z҈>Ӏ׀W%L$4xWIv֌'IzLӗQ\C$+Ug;OI_}aPZvAK~vvG_ЦV ,"c ~\MHj ^^'(W I8>DIIڵʹoIDIW+3+Sy̆yzOuƴ| `Cbv jSGlTI~@|/M[Uy2y0-?_nscȌ |" <;?ƣiՁV!}Սïggx}%M2?V$}x/^_>GMOrs;gIjff< wQxNs7A4gM)OFڜ֭0fFNn+'Y3 nm 셗gmcfӔ"SxaA*>WHJy6p؎ ,Оn+X=ކs!˛u H.z|ۺH:w+}{(}/%p%=5^hN7Cb4՚kDM?ШW^{ 'תIjY|"aL_~ EfviWX{C0 fv"9qZy^7I5óxM;Iu&X]Jŀ,F6*i]K|TFct[>Q %AҞT#iH]I/^HZ5C_N;X@>AO;ׯj΢HݨWgF IDAT7iӎEF+iNIfd&]7Niu_)c(f@'qniQ=N P'F#\xfXw_ByY*6ZD:Ļ.">e[_Jz 8{Sϻ8Z9􆤻Z~s&u6Rtm.pEp/|d%,i,~w^ң hqܹ#_gE+؏03{%Zԣ+X:6ڬvoq7߲SҚ= ١s_y36A2J_0Kf\O7ٗۢ\syhF56j\և`Ymfi~M-|r6:%b㒾 H5񠆝d`03fvnjZe8 <`y9G5 %bF %€A-$ h0 AAK Z" HAa@ AD %€A-$ h0 AAK Z" HPi oG$(Ϥ%% HPSYV"E q€E1l% (0 AQO@ E E q€E$z0 AQ ' HPa@ Et ' HPQ ' HPa@ E q€E$z0 AQ ' HPa@ ˆA$()7 H(a@=N`9sU OIڨ3AP$a@v0xRNiIHLJ2"3+[`#i4HJz xXxX4#~mY (3I 708#JAP8Q ڂq Ħ ٫P)HQbW! HN`V6$ 筲{Y (m&g}I -€ #\XAۑtv& `WJA@@"B.G d F 3{8m \[:AD(~oKN 1€Eq08lE (/(dAГ Z"\XAAK Z" HAa@ AD %€A-$ h0 AAK Z" HACVЧf6d},, ,< 2.b fB <8̞TA1tE0EI+gBp}$|7x8ifS;ZЅHX/ß=Z^exg`E`G2\ AB@`jfWJ7 ^#RpM?^.HK`Mj4{;#4箾)Hjf6| .jc*̖Y7>~E``{pmcϿ8Cp`-jJZ^)@wLe72JL~mfwJ:9ppJ ]|Xr?cX `/8}80\zd]*A2M _˛ӵI?6}' HdJS|jljfLDI ?MJZ&Y?ļl|=㑑 ;ԭ n3ۍK3}-N@z H0.>&3{ x6f-& b{X!>x,E$ $U@6H{zxanteAVlU@1€ $,]`X@1!){'7 Vţ)TYAQ…cC16O U0HqNoMx"7…iIk$cfOau}إ[@r5:̢#PH:}v2g2D O҈ݫ苴z&4 #i{|uk f} ֣He)$(nF> |XX8 x''ixJfn:QV"y-%S}%Pх7Be+Eҫ*Àl if7K:wu,|+Is%^ܒ9WT*1 /ǚDn`9kS$.6F1/, M +T(4>I$;fvdt 3~O ]a{3&J ܜln+@JZ pY6PI>w8- l,wι^ʝktaj3{Jkm6偍qKEfxffj#)窜kޞd'+k~.ɝov`۔k\Twe .pu<+QpW;,[}J~Nrٺfeuj`I}[P3?4==L"&77^{oVd6K/3${KvܘNIǬJ7:p=R xcI22ҹHqCܹVHN[݁{bs[? tjNndࡴ~P~m};W5&Jia@Ga@>ˀ${xAeTF~\cŀ||!M/93Ӌ&`3.Rڢxsm_I-am7 x;'0of{NM:<\{98γ xdHӵX0 ۩VHKw^747ÖwLퟂA BdAY5;A3;;,w3]3F}=̎5gk~aE&mO_xif6>kyk%l>od/63omjIʶ fX\4N6It#\efҽx{Z !iSJ2=K3;COkl/ްڝqN>ls `2C $bfSp#!33Iڲmfu;#HZ 8/´3NUtpp[5X9!dy lXk HjZ&mΏ?؝-ƪ}kIx`if3I6c6l#Ko /VI0,N̥ݟO~c|7&S^3/˿nI|ǖN|!#ff7HZͬ蝿7 r^o|J{x5-ܤFWMfN ٳYVee*V%wq]ˆ́/!IW31U>xgM^Mؼgaa6/U}xQN6W?fׅ2 x1$-63s;C!i:+gm wFXwTϬh>ɺZ꞊{qq;/ ;_RY|X.%͗HDҢx9'{p ͬEICKZ4HbfW.Im^ƣ}TV`/g00$n\6U9o7Y>bv: 5/?h8ÂuAs5[}AI 8l<"xVͬj:yI'J,>i.yJjx˜!IIZwug{/ཹ&'JKZ7ˏlJc{5G ftoHqq/ϻK#ݿSVzz ^H ҡyL /6,}-߫ 6 춌~Wҁ2tC*G?>aU?8AߝdNd [x[ķFYs:ppas;܍sΝoS>xzV">s7w}]ESxM9|<^g~GH: @W#zAV=f09𯅥~+[{_Fnn*lif=7u)ܯ^2Cȝa=^b> eYi]ЧAbV2 Eu ܼ'2C/(nraxl S6};wNZWv%aZ%?IfVS.(AxފxL'G^X`@3"VsnlfFf0WIagxG0b }d \ !q ʹ29C Hr&@bwOis2R4!ʬ,OrQ[1< m<خU3T@b\ruD> ^f+B f9Ŭ).\Xx07{̞,\%̬؏^fǪ].YUc=5ҳWh>I0(+)O4{'.kfUE59/%%,iq|ވL AǺyKj&njr`;t^Q!Lb#‰H1NzxAtC D A'6"b$\X=D :IzxAta@ $Q!!AIA'P&=D ڂyk"ip AXH>[GnAv€t9a@ h f6xTҭ"V1,E8]7a$pĸ,FHXXHf?3?fŧ}x>(W (0tO=)"@=iESIӂf\&v^à( ϗH|XXX x<b Iin10("i$g?9f`sjy#VL`&Au٪iƽU >]`S?Gƌ-+ggD3DH$-\UxoѭFϙ=D ϥ}p tnꅵp }c*0}̾ef;Gᾚ_"9kXތe2r?l*pF_ef/HA&֮fvNiTAfxU / |\Xg7 m5;ͩp3^o=_<¡Ytp{x0ܲu6)z }dޖsmÒn;4[xG`M.BҼ6?KO45upڑ??z0,€fzjfw?AY܆w8i!Ϡt kI_\Wj;*+V6>ƺ?IJBv y]E.M? \7y ȟj-Q~IY6=CQOfvBǴ qf-6w$3S`1\XÀ$-H̟Y ؉ $?f4Ctc?;xty;>iG`31kSN0wf}/ܥ58U i $]_)F\#piWA({\Si/ ىSEimHB8ŀ|-P7T0pYQf= H5H ;y|:%6_iL9vJ4"ifJ;tN* ;/ᒪQ`LR1@BxWRcfRJn'%2k G%R tW &pTu>`uC$\In~AЈ/g(mgJ.B$^+w{fѯ{I$܍VO2G:cP.kwpzf50szضT]YĹRf4|M%Wµafg>UEt40AP0Cd7`C`Kcp<|$4/sL_\b%2J ՜#xhol Z8FhM/x.S .oAe Z" HAa@ AD %"tJ3)I3;;.|٣ӟVfƙY > l XxN!i5`ϙqКP_7[ҙXT) IDATw>~B[%Q&tJ:X̾tHQ|%mjf|Ot][NA{Vs \T#LIxhE> /=^ 9 e%/ I0Wezf,|@~ڊBi{]ya3{ u ڀ̬Y ܟz48~,i|{N* :C'.i]`-<}Bgf[N ??f0rO$U~750;2y$wp:&?\fffd6BS_df/Uot'Àk-36+Z|5;x>Zexyu3Szga^<fFe&_5W%#箕;7! 3"'gxUajk}霖9#YnwOޤp3S׳q<[/^m20!űi{)8!U.t_]Lh 3qm wAC_]G&`|مn5sf+d< f4`r>8.V1 M 2r#RYX$-j\Ϩtmpo lm <ص`w9~6]7ȼS xo u_In$N.̀WriGiO9/m޳d6ݠgT^N[ GȜtSz **&ofb@]Ͱ}h8'WI_J^qVLV_~fy?Y\KrאC 5X_+Iov oIK[t=>_b{TK^!V|H]77Ogfku?,q' \ i6I{/*8A&E =қbD+ ET b rAQDEDM#5X)cg̙9sfϜ}g{ϚgkiƷzfWRfĊ`9Ζ OAR"tJZ()jYMZTS̼⽒Ηt77hkJ~`"8+3ˁKކ7gTș{O6!1҇3$]|2^{j}}"iC 0tY`7҇gp_5߯`TwotE󤳞9i*(ygI,No5(^y /T9I?>LJ{`ψxR%t̞H#{zl_tXU|~~UԚm,q CH\Ij\SD4ZwMޓ@cee !) 5' pdD\P8Yk+,*xhC|._7=,O1paDS6$}AEVDJ.XTW~`׈hZt`ĝ(Eny 6bרD2' "Fĩ PUŴʆuom=YNs3KUZ[zyGE-i J)VK_UT倫sI;"!I*(>_^s_8RkV,OIGĬ'U\I:[Z#V-/~J@_µT0?9Vt%]Jjٴ"^ߡ/À+$M&]=w>pIg>#[tpr{j涤_-SHzբKJ:v ACZ>m˴<$HͯtD"#5c_,I_VDP՗ 댪m/Um}I&ח/ ۤ_}*bS5[fːaϨ8Q-~Z>˝26gm@x>v'Zgq#u0?" K)#^et:xқyMmf ۧX/"%\kFPbךnxt1iF6nuƑL_ݜTEkC7 )mV~VeZtiScx-IpR'N&H?ҩ}ZW@jb#l#} 1 !3'n(xFI=c)u?!l;_Hcjmj⎌Utr: wx;# 7+5IrNECzU-<7 Zbff-W"n3RV~NUsY$ky "n.DjZXywEH%iU@pl0WJ5;=.1S5~syv, 1;ui- vg1Mx=:1FٷXl@GK#_]9"TuxBPcű 1yL,+גulwG iHE"Ii{KǪ"#3ϗ Ӣ6! 6TUS=HaFFovHúoJf~zj!@" RIw~|cDwg#bJko{Hv' Ls:˱ [myP?:$mX4֏З#{G`JzIuB&/H&V)MyሸF]W.YDm k~I:# 0t4( vHP(sK~HvzrON47!2o ͇]Y9)i'qFe`:WToy Cxä/Ǯ+UXW?9FUe"} '<,K`ࠞ沏cOy}êc.؜Y8^O~׽7 ]rqRڨm"!_3 9[ d74<%]/Hڍ4 WWׁHI??7n_q)pi8hinSHލ8JRLt߉jn%U~yaq&}d/ζ'{s>. 7QwFď$U(0*̑L|ixb䉤E?I!%%oI;?""6x/+aW-kdɶU%@UI ED{0Oi{:ຼXҌg$ʇg$4gwyO7an$ ׮h!"m2d}%· R{:=%,"JvI籤EgḌ0kaQpE#IWsIEIH?#6+H>܆z5)nȊ q0 d3I?* nva!+i5ekF=үHTIhV"%F֍/eh&>J,sM:^'?ܗ;@_fP&%MUI 6 U;G:~4?%0ZlT5 T6'"BHgT6BU.NW꯬/]6ڿj3]Oq+(fדf;x"(Sgdӑ23<:>7:^w$ RնT_ΏM~.6I+Puq?VGJycʵ/Y4wzwYEęHU8'F&Wޕ*ފ9ԙcz1!Z7Δکzzƻ#₈-+*wEćHg:} fsIuF:roVD6q[a/msoE$-/rCᲲ\$qv>U&Ng%}P/%ڨln͓A r|'hC憥F7IZ @/ 74W 'V/KJ4߆4y9*x5u^$U9#jxZ>iT|nژ@$}4w@#Uv]˴TğU`R#Bٯ~]K a`+TEte{rǷohmYG/BL%Um≯&4ns ~RMt-RKLJZ!}7-E+G"UgA.&ym .ifaJDԮ椪E"R"ԩ䑽ӺR3݆:ۑT}q !5N#@̬%>138YK@^#QG>3["obD Djf@,Œ|f9N VyF'+@F9'+(beq1@,N f ls lTs(beq(beq1@,N f ls8rN V'Q ffe IKv;3+e^w5(beq1@l$-Ucs"iuʏbpT%~,!ͬݎsVH->|X Xx("&v#N3k/'k I?lqbY\erQ./5 3X[HZ 5HDdfeED,.iPgf@m$ T1cY|bm<|bva2e\em{V)l^w'*3+@"%Ua68XLJfV*WaY)$l ,Vt9$3k3XYg8yNN VtہY9@/Rs@4g Z*,33kdL$`|/~53$iIgHx pOIOJ}emSݎɬW"z4 غɧ\)/Iz5p0܈.d\[00yAjZ~vs<̬\՛N&DgDo^(#pR7,t?2p_13@zx`LḒ./DıՅGu*Z$'} 6"ͬ N H}=o>VWEN̚bEgz{C`Rc8X /hN Og7GĜǰys'ofCbH:85 ww!o_l<{.`2='i>$Y@;y8'!8HsK6c|c16pQvMu1$kKX5/*$ 4`E44˫ЬK|HڈK<8%39\C$ \G_G[)vmDeff'޲!va}`j= \effHoy8 e|K71eneff-q Zbff-q138YK@̬%N ff'33k Zbff-q138YK@̬%N ffO(eHz5¦"n imFs\#.gֳ<-"i F`"+sKZ. Eĥ*|bEIkPt jY5'U]W_u1u)%Ig"7z'-`@J.K_HfHzpQé#Z56RZTfVHo9XtT{jג*YGHZ8(GP;H:򼈘\RWjPxv2ԇs̬M<Hꆈt-Pa?ʏ^*lzCD]V|f֟l$ydb'T?TUX4?Yw77&("H %o OYDDQ>|C5u4>F:xؖX^ P1Q8_AZg`?`P7%IDATX;"$}A Lu0O6}X?"&E;SKZS1Y*f)x{D<սH8<l j[ X6ozoD\ޙ( |ҋI_xw$lU@D< RشeQN =#ŮERۄe),Pl0N =D`y]  ˫5([p @zFRyyfD̪< i}I{HBRwWHҲVM.-"3 lVX~@Ҟn"} <'OS5v&_(0@~lWJr}yKj餡L&GEʎsVoyjK_y}9! inq_$ \$龈C15hPJ=^$@A?Y<6Vflf6HoS>f>ǑF- -?Awt)QYMN FkKFgxv"`df8YZARGe (_c~ɧ̬͜@zHDn(ljtwf#`Fay&Tٸ!Y=N 'c$.I' n-5䏅%hyLϏnYN 2.\&\DҒXD<dI=Qr4inKˎsG$3ʜא2؋#~9"NPlkDV,l?Q9M\t76rQ> EWBҨ: iw|ʪg*pHDT7Q690I ,_x Oջ;aP%q$]0jDLBxf?0vuyIENDB`Theano-rel-0.9.0/doc/bcast.svg000066400000000000000000000334451306376074600161250ustar00rootroot00000000000000 image/svg+xml 1 23 45 6 1 21 21 2 2 44 66 8 1 2 + shape: (3, 2)bcast: (F, F) shape: (1, 2)bcast: (T, F) 1 23 45 6 + shape: (3, 2)bcast: (F, F) shape: (3, 2)bcast: (T, F) broadcasted Theano-rel-0.9.0/doc/cifarSC2011/000077500000000000000000000000001306376074600161155ustar00rootroot00000000000000Theano-rel-0.9.0/doc/cifarSC2011/advanced_theano.txt000066400000000000000000000577401306376074600217760ustar00rootroot00000000000000 .. _advanced_theano: *************** Advanced Theano *************** Conditions ---------- **IfElse** - Build condition over symbolic variables. - IfElse Op takes a boolean condition and two variables to compute as input. - While Switch Op evaluates both 'output' variables, IfElse Op is lazy and only evaluates one variable respect to the condition. **IfElse Example: Comparison with Switch** .. testcode:: from theano import tensor as T from theano.ifelse import ifelse import theano, time, numpy a,b = T.scalars('a','b') x,y = T.matrices('x','y') z_switch = T.switch(T.lt(a,b), T.mean(x), T.mean(y)) z_lazy = ifelse(T.lt(a,b), T.mean(x), T.mean(y)) f_switch = theano.function([a,b,x,y], z_switch, mode=theano.Mode(linker='vm')) f_lazyifelse = theano.function([a,b,x,y], z_lazy, mode=theano.Mode(linker='vm')) val1 = 0. val2 = 1. big_mat1 = numpy.ones((10000,1000)) big_mat2 = numpy.ones((10000,1000)) n_times = 10 tic = time.clock() 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)) tic = time.clock() 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)) .. testoutput:: :hide: :options: +ELLIPSIS time spent evaluating both values ... sec time spent evaluating one value ... sec IfElse Op spend less time (about an half) than Switch since it computes only one variable instead of both. .. code-block:: none $ python ifelse_switch.py time spent evaluating both values 0.6700 sec time spent evaluating one value 0.3500 sec Note that IfElse condition is a boolean while Switch condition is a tensor, so Switch is more general. It is actually important to use ``linker='vm'`` or ``linker='cvm'``, otherwise IfElse will compute both variables and take the same computation time as the Switch Op. The linker is not currently set by default to 'cvm' but it will be in a near future. Loops ----- **Scan** - General form of **recurrence**, which can be used for looping. - **Reduction** and **map** (loop over the leading dimensions) are special cases of Scan - You 'scan' a function along some input sequence, producing an output at each time-step - The function can see the **previous K time-steps** of your function - ``sum()`` could be computed by scanning the z + x(i) function over a list, given an initial state of ``z=0``. - Often a for-loop can be expressed as a ``scan()`` operation, and ``scan`` is the closest that Theano comes to looping. - The advantage of using ``scan`` over for loops - The number of iterations to be part of the symbolic graph - Minimizes GPU transfers if GPU is involved - Compute gradients through sequential steps - Slightly faster then using a for loop in Python with a compiled Theano function - Can lower the overall memory usage by detecting the actual amount of memory needed **Scan Example: Computing pow(A,k)** .. code-block:: python import theano import theano.tensor as T k = T.iscalar("k"); A = T.vector("A") def inner_fct(prior_result, A): return prior_result * A # Symbolic description of the result result, updates = theano.scan(fn=inner_fct, outputs_info=T.ones_like(A), non_sequences=A, n_steps=k) # Scan has provided us with A**1 through A**k. Keep only the last # value. Scan notices this and does not waste memory saving them. final_result = result[-1] power = theano.function(inputs=[A,k], outputs=final_result, updates=updates) print power(range(10),2) #[ 0. 1. 4. 9. 16. 25. 36. 49. 64. 81.] **Scan Example: Calculating a Polynomial** .. testcode:: import numpy import theano import theano.tensor as T coefficients = theano.tensor.vector("coefficients") x = T.scalar("x"); max_coefficients_supported = 10000 # Generate the components of the polynomial full_range=theano.tensor.arange(max_coefficients_supported) components, updates = theano.scan(fn=lambda coeff, power, free_var: coeff * (free_var ** power), outputs_info=None, sequences=[coefficients, full_range], non_sequences=x) polynomial = components.sum() calculate_polynomial = theano.function(inputs=[coefficients, x], outputs=polynomial) test_coeff = numpy.asarray([1, 0, 2], dtype=numpy.float32) print(calculate_polynomial(test_coeff, 3)) .. testoutput:: 19.0 Exercise 4 ----------- - Run both examples - Modify and execute the polynomial example to have the reduction done by scan Compilation pipeline -------------------- .. image:: ../hpcs2011_tutorial/pics/pipeline.png :width: 400 px Inplace optimization -------------------- - 2 type of inplace operations: - An op that return a view on its inputs (e.g. reshape, inplace transpose) - An op that write the output on the inputs memory space - This allows some memory optimization - The Op must tell Theano if they work inplace - Inplace Op add constraints to the order of execution Profiling --------- - To replace the default mode with this mode, use the Theano flags ``profile=True`` - To enable the memory profiling use the flags ``profile=True,profile_memory=True`` Theano output for running the train function of logistic regression example from :doc:`here <../tutorial/examples>` for one epoch: .. code-block:: python """ Function profiling ================== Message: train.py:47 Time in 1 calls to Function.__call__: 5.981922e-03s Time in Function.fn.__call__: 5.180120e-03s (86.596%) Time in thunks: 4.213095e-03s (70.430%) Total compile time: 3.739440e-01s Number of Apply nodes: 21 Theano Optimizer time: 3.258998e-01s Theano validate time: 5.632162e-03s Theano Linker time (includes C, CUDA code generation/compiling): 3.185582e-02s Import time 3.157377e-03s Time in all call to theano.grad() 2.997899e-02s Time since theano import 3.616s Class --- <% time>