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

All Samples(87)  |  Call(80)  |  Derive(0)  |  Import(7)

src/p/y/pylearn2-HEAD/pylearn2/models/s3c.py   pylearn2(Download)
import theano.tensor as T
 
from pylearn2.utils import make_name, sharedX, as_floatX
from pylearn2.blocks import Block
from pylearn2.expr.information_theory import entropy_binary_vector
        var_HS = H_hat * var_s1_hat + (1.-H_hat) * var_s0_hat
 
        half = as_floatX(.5)
 
        HS = H_hat * S_hat
        """
 
        half = as_floatX(.5)
 
        one = as_floatX(1.)
 
        two = as_floatX(2.)

src/p/y/pylearn2-HEAD/pylearn2/models/rbm.py   pylearn2(Download)
# Local imports
from pylearn2.blocks import Block, StackedBlocks
from pylearn2.utils import as_floatX, safe_update, sharedX
from pylearn2.models import Model
from pylearn2.expr.nnet import inverse_sigmoid_numpy
        """
        v_mean = params[0]
        return as_floatX(rng.uniform(size=shape) < v_mean)
 
    def input_to_h_from_v(self, v):
            self.anneal_start = None
        else:
            self.anneal_start = as_floatX(anneal_start)
 
        # Create accumulators and epsilon0's
            for param in self.params:
                self.accumulators[param] = theano.shared(
                        value=as_floatX(0.), name='acc_%s' % param.name)
                self.e0s[param] = as_floatX(base_lr)
 

src/p/y/pylearn2-HEAD/pylearn2/expr/basic.py   pylearn2(Download)
 
from pylearn2.blocks import Block
from pylearn2.utils import as_floatX, constantX
 
 
    theano variables
    """
    return T.sqrt(as_floatX(1e-8)+T.sqr(W).sum(axis=0))
 
 

src/p/y/pylearn2-HEAD/pylearn2/energy_functions/tests/test_rbm_energy.py   pylearn2(Download)
import theano.tensor as T
from theano import function
from pylearn2.utils import as_floatX
from pylearn2.utils import sharedX
from pylearn2.linear.matrixmul import MatrixMul
vW = rng.randn(nv, nh)
W = sharedX(vW)
vbv = as_floatX(rng.randn(nv))
bv = T.as_tensor_variable(vbv)
bv.tag.test_value = vbv
vbh = as_floatX(rng.randn(nh))
bh = T.as_tensor_variable(vbh)
bh.tag.test_value = bh
vsigma = as_floatX(rng.uniform(0.1, 5))
 
V = T.matrix()
V.tag.test_value = as_floatX(rng.rand(test_m, nv))
H = T.matrix()
H.tag.test_value = as_floatX(rng.rand(test_m, nh))

src/p/y/pylearn2-HEAD/pylearn2/models/tests/test_s3c_misc.py   pylearn2(Download)
from pylearn2.models.s3c import E_Step_Scan
from pylearn2.models.s3c import Grad_M_Step
from pylearn2.utils import as_floatX
from theano import function
import numpy as np
        mu = self.model.mu
        alpha = self.model.alpha
        half = as_floatX(.5)
 
        mean_sq_s = self.stats.d['mean_sq_s']
 
 
        half = as_floatX(0.5)
        one = as_floatX(1.)
        two = as_floatX(2.)

src/p/y/pylearn2-HEAD/pylearn2/datasets/tests/test_preprocessing.py   pylearn2(Download)
import theano
 
from pylearn2.utils import as_floatX
from pylearn2.datasets import dense_design_matrix
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
    def test_zero_vector(self):
        """ Test that passing in the zero vector does not result in
            a divide by 0 """
 
        dataset = DenseDesignMatrix(X=as_floatX(np.zeros((1, 1))))
        rng = np.random.RandomState([1, 2, 3])
 
        X = as_floatX(rng.randn(num_examples, num_features))
 
        dataset = DenseDesignMatrix(X=X)
 
        rng = np.random.RandomState([1, 2, 3])
        X = as_floatX(rng.randn(5, 32*32*3))
 
        axes = ['b', 0, 1, 'c']
        """
 
        X = as_floatX(np.zeros((5, 32*32*3)))
 
        axes = ['b', 0, 1, 'c']

src/p/y/pylearn2-HEAD/pylearn2/expr/tests/test_coding.py   pylearn2(Download)
from pylearn2.expr.coding import triangle_code
import numpy as np
import theano.tensor as T
from theano import function
from pylearn2.utils import as_floatX
    k = 7
 
    X = as_floatX(rng.randn(m,n))
    D = as_floatX(rng.randn(k,n))