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

All Samples(115)  |  Call(53)  |  Derive(33)  |  Import(29)

src/p/y/pylearn2-HEAD/pylearn2/scripts/papers/jia_huang_wkshp_11/extract_features.py   pylearn2(Download)
from pylearn2.utils import serial
from pylearn2.utils.rng import make_np_rng
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix, DefaultViewConverter
from pylearn2.datasets.cifar10 import CIFAR10
from pylearn2.datasets.cifar100 import CIFAR100
 
 
        fd = DenseDesignMatrix(X = np.zeros((1,1),dtype='float32'), view_converter = DefaultViewConverter([1, 1, nhid] ) )
 
        ns = 32 - size + 1

src/p/y/pylearn2-HEAD/pylearn2/datasets/adult.py   pylearn2(Download)
import os
 
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
from pylearn2.format.target_format import convert_to_one_hot
from pylearn2.utils.string_utils import preprocess
    X = np.concatenate(pieces, axis=1)
 
    return DenseDesignMatrix(X=X, y=y)
 
if __name__ == "__main__":

src/p/y/pylearn2-HEAD/pylearn2/cross_validation/dataset_iterators.py   pylearn2(Download)
 
from pylearn2.cross_validation.blocks import StackedBlocksCV
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
from pylearn2.datasets.transformer_dataset import TransformerDataset
 
            for label, data in data_subsets.items():
                X, y = data
                datasets[label] = DenseDesignMatrix(X=X, y=y)
 
            # preprocessing

src/p/y/pylearn2-HEAD/pylearn2/testing/datasets.py   pylearn2(Download)
 
import numpy as np
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
 
class ArangeDataset(DenseDesignMatrix):
        Y = None
 
    return DenseDesignMatrix(X=X, y=Y)
 
def random_one_hot_dense_design_matrix(rng, num_examples, dim, num_classes):
        Y[i,idx[i]] = 1
 
    return DenseDesignMatrix(X=X, y=Y)
 
def random_one_hot_topological_dense_design_matrix(rng, num_examples, shape, channels, axes, num_classes):
        Y[i,idx[i]] = 1
 
    return DenseDesignMatrix(topo_view=X, axes=axes, y=Y)
 

src/p/y/pylearn2-HEAD/pylearn2/datasets/tests/test_dense_design_matrix.py   pylearn2(Download)
import numpy as np
 
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrixPyTables
from pylearn2.datasets.dense_design_matrix import DefaultViewConverter
    rng = np.random.RandomState([1,2,3])
    topo_view = rng.randn(5,2,2,3)
    d1 = DenseDesignMatrix(topo_view = topo_view)
    X = d1.get_design_matrix()
    d2 = DenseDesignMatrix(X = X, view_converter = d1.view_converter)
def test_convert_to_one_hot():
    rng = np.random.RandomState([2013, 11, 14])
    m = 11
    d = DenseDesignMatrix(
            X=rng.randn(m, 4),
def test_init_with_vc():
    rng = np.random.RandomState([4,5,6])
    d = DenseDesignMatrix(
            X=rng.randn(12, 5),
            view_converter = DefaultViewConverter([1,2,3]))

src/p/y/pylearn2-HEAD/pylearn2/scripts/icml_2013_wrepl/emotions/emotions_dataset.py   pylearn2(Download)
 
from pylearn2.datasets.dense_design_matrix import DefaultViewConverter
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
from pylearn2.utils.string_utils import preprocess
 
class EmotionsDataset(DenseDesignMatrix):

src/p/y/pylearn2-HEAD/pylearn2/datasets/tests/test_preprocessing.py   pylearn2(Download)
from pylearn2.utils import as_floatX
from pylearn2.datasets import dense_design_matrix
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
from pylearn2.datasets.preprocessing import (GlobalContrastNormalization,
                                             ExtractGridPatches,
    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))))
        X = as_floatX(rng.randn(num_examples, num_features))
 
        dataset = DenseDesignMatrix(X=X)
 
        #the setting of subtract_mean is not relevant to the test
    topo = rng.randn(4, 3*5, 3*7, 2)
 
    dataset = DenseDesignMatrix(topo_view=topo)
 
    patch_shape = (3, 7)
        view_converter = dense_design_matrix.DefaultViewConverter((32, 32, 3),
                                                                  axes)
        dataset = DenseDesignMatrix(X=X, view_converter=view_converter)
        dataset.axes = axes
        preprocessor = LeCunLCN(img_shape=[32, 32])

src/p/y/pylearn2-HEAD/pylearn2/datasets/icml07.py   pylearn2(Download)
from pylearn2.utils.string_utils import preprocess
from pylearn2.datasets.cache import datasetCache
from pylearn2.datasets.dense_design_matrix import (
    DenseDesignMatrix, DefaultViewConverter)
 
 
class ICML07DataSet(DenseDesignMatrix):

src/p/y/pylearn2-HEAD/pylearn2/training_algorithms/tests/test_sgd.py   pylearn2(Download)
from pylearn2.costs.cost import Cost, SumOfCosts, DefaultDataSpecsMixin
from pylearn2.devtools.record import Record, RecordMode
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
from pylearn2.models.model import Model
from pylearn2.monitor import Monitor
    X = np.zeros((m, 1))
    X[:, 0] = np.arange(m)
    dataset = DenseDesignMatrix(X=X)
 
    model = SoftmaxModel(1)
        Y[i, idx[i]] = 1
 
    dataset = DenseDesignMatrix(X=X, y=Y)
 
    m = 15
    # Including a monitoring dataset lets us test that
    # the monitor works with supervised data
    monitoring_dataset = DenseDesignMatrix(X=X, y=Y)
 
    model = SoftmaxModel(dim)
    X = rng.randn(m, dim)
 
    dataset = DenseDesignMatrix(X=X)
 
    m = 15

src/p/y/pylearn2-HEAD/pylearn2/datasets/norb_small.py   pylearn2(Download)
class NORBSmall(dense_design_matrix.DenseDesignMatrix):
    """
    A pylearn2 dataset object for the small NORB dataset (v1.0).
 
    Parameters
class FoveatedNORB(dense_design_matrix.DenseDesignMatrix):
    """
    .. todo::
 
        WRITEME

  1 | 2 | 3 | 4 | 5  Next