[Numpy-discussion] Announcing Theano 0.7

2015-03-27 Thread Pascal Lamblin

===
 Announcing Theano 0.7
===

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.7 is recommended for everyone, but you should
first make sure that your code does not raise deprecation warnings with
the version you are currently using.

For those using the bleeding edge version in the git repository, we
encourage you to update to the `rel-0.7` tag.

What's New
--

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

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/

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, and to list them all would be
impractical.

I would also like to thank users who submitted bug reports.

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 )

-- 
Pascal
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Announcing Theano 0.5

2012-02-23 Thread Pascal Lamblin
(axes) axes is optional (James)
* theano.tensor.transpose(a_tensor, kwargs) We where 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 support testing the full and structured gradient.
 # 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 library that are only headers,
   this can be useful. (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 32bits computer: make sure all shape 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 
https://www.assembla.com/spaces/theano/tickets/763`_).
 * 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

Re: [Numpy-discussion] Upgrade to 1.6.x: frompyfunc() ufunc casting issue

2012-01-20 Thread Pascal Lamblin
Hi everyone,

A long time ago, Aditya Sethi ady.sethi@gmail... wrote:
 I am facing an issue upgrading numpy from 1.5.1 to 1.6.1.
 In numPy 1.6, the casting behaviour for ufunc has changed and has become
 stricter.
 
 Can someone advise how to implement the below simple example which worked in
 1.5.1 but fails in 1.6.1?
 
  import numpy as np
  def add(a,b):
 ...return (a+b)
  uadd = np.frompyfunc(add,2,1)
  uadd
 ufunc 'add (vectorized)'
  uadd.accumulate([1,2,3])
 Traceback (most recent call last):
   File stdin, line 1, in module
 ValueError: could not find a matching type for add (vectorized).accumulate,
 requested type has type code 'l'

Here's the workaround I found to that problem:

 uadd.accumulate([1,2,3], dtype='object')
array([1, 3, 6], dtype=object)

It seems like accumulate infers that 'l' is the required output dtype,
but does not have the appropriate implementation:
 uadd.types
['OO-O']

Forcing the output dtype to be 'object' (the only supported dtype) seems
to do the trick.

Hope this helps,
-- 
Pascal
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion