Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

src/p/y/pylearn2-HEAD/pylearn2/models/s3c.py   pylearn2(Download)
from pylearn2.space import VectorSpace
from pylearn2.utils.rng import make_np_rng
from pylearn2.expr.basic import (full_min,
        full_max, numpy_norms, theano_norms)
 
    """
 
    norms = theano_norms(new_W)
 
    # update, scaled back onto unit sphere
    new_basis_dir = scal_points - dot_update * old_W
 
    new_basis_norms = theano_norms(new_basis_dir)
 
    new_basis = new_basis_dir / new_basis_norms
 
                    if param == 'W':
                        norms = theano_norms(self.W)
                        rval['W_norm_min'] = full_min(norms)
                        rval['W_norm_mean'] = T.mean(norms)
                del updates[self.W]
            elif self.constrain_W_norm:
                norms = theano_norms(updates[self.W])
                updates[self.W] /= norms.dimshuffle('x',0)
 

src/p/y/pylearn2-HEAD/pylearn2/models/sparse_autoencoder.py   pylearn2(Download)
from theano.sparse.sandbox.sp2 import sampling_dot
 
from pylearn2.expr.basic import theano_norms
 
 
        """
        vb, hb, weights = self.get_params()
        norms = theano_norms(weights)
        return {'W_min': tensor.min(weights),
                'W_max': tensor.max(weights),