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

All Samples(14)  |  Call(12)  |  Derive(0)  |  Import(2)

src/p/y/pylearn2-HEAD/pylearn2/models/dbm/layer.py   pylearn2(Download)
from theano.printing import Print
 
from pylearn2.expr.nnet import sigmoid_numpy
from pylearn2.expr.probabilistic_max_pooling import max_pool_channels, max_pool_b01c, max_pool, max_pool_c01b
from pylearn2.linear.conv2d import make_random_conv2D, make_sparse_random_conv2D
 
        if center:
            self.offset = sharedX(sigmoid_numpy(init_bias))
 
    def get_biases(self):
        if recenter:
            assert self.center
            self.offset.set_value(sigmoid_numpy(self.bias.get_value()))
 
    def upward_state(self, total_state):
            raise NotImplementedError()
        driver = numpy_rng.uniform(0.,1., (num_examples, self.nvis))
        mean = sigmoid_numpy(self.bias.get_value())
        sample = driver < mean
 
            if self.pool_size != 1:
                raise NotImplementedError()
            self.offset = sharedX(sigmoid_numpy(self.b.get_value()))
 
    def get_lr_scalers(self):

src/p/y/pylearn2-HEAD/pylearn2/models/dbm/ising.py   pylearn2(Download)
import warnings
 
from pylearn2.expr.nnet import sigmoid_numpy
from pylearn2.linear.matrixmul import MatrixMul
from pylearn2.models.dbm import init_sigmoid_bias_from_array
        if recenter:
            assert self.center
            self.offset.set_value(sigmoid_numpy(self.bias.get_value()))
 
    def upward_state(self, total_state):
        """
        driver = numpy_rng.uniform(0., 1., (num_examples, self.nvis))
        on_prob = sigmoid_numpy(2. * self.beta.get_value() *
                                self.bias.get_value())
        sample = 2. * (driver < on_prob) - 1.
            if self.pool_size != 1:
                raise NotImplementedError()
            self.offset.set_value(sigmoid_numpy(self.b.get_value()))
 
    def get_biases(self):
        """
        driver = numpy_rng.uniform(0., 1., (num_examples, self.dim))
        on_prob = sigmoid_numpy(2. * self.beta.get_value() *
                                self.b.get_value())
        sample = 2. * (driver < on_prob) - 1.