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

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/p/y/pylearn2-HEAD/pylearn2/sandbox/nlp/models/mlp.py   pylearn2(Download)
from pylearn2.utils import sharedX
from pylearn2.utils import wraps
from pylearn2.sandbox.nlp.linear.matrixmul import MatrixMul
from theano.compat.python2x import OrderedDict
 
        W.name = self.layer_name + '_W'
 
        self.transformer = MatrixMul(W)
 
        W, = self.transformer.get_params()

src/p/y/pylearn2-HEAD/pylearn2/sandbox/nlp/linear/tests/test_matrixmul.py   pylearn2(Download)
import theano
 
from pylearn2.sandbox.nlp.linear.matrixmul import MatrixMul
from pylearn2.utils import sharedX
from theano import tensor
 
    tensor_W = [sharedX(W) for W in np_W]
    matrixmul = [MatrixMul(W) for W in tensor_W]
    assert all(mm.get_params()[0] == W for mm, W in zip(matrixmul, tensor_W))