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

All Samples(67)  |  Call(48)  |  Derive(0)  |  Import(19)

src/p/y/pylearn2-HEAD/pylearn2/datasets/dense_design_matrix.py   pylearn2(Download)
from pylearn2.datasets.dataset import Dataset
from pylearn2.datasets import control
from pylearn2.space import CompositeSpace, Conv2DSpace, VectorSpace, IndexSpace
from pylearn2.utils import safe_zip
from pylearn2.utils.rng import make_np_rng
                y_source = 'targets'
 
                space = CompositeSpace((X_space, y_space))
                source = (X_source, y_source)
            self.data_specs = (space, source)
                assert self.y is not None
                y_space = self.data_specs[0].components[1]
                space = CompositeSpace((X_space, y_space))
                source = ('features', 'targets')
            else:
                y_source = 'targets'
 
                space = CompositeSpace((X_space, y_space))
                source = (X_source, y_source)
 
                y_space = VectorSpace(dim=dim)
            y_source = 'targets'
            space = CompositeSpace((X_space, y_space))
            source = (X_source, y_source)
 

src/p/y/pylearn2-HEAD/pylearn2/datasets/norb.py   pylearn2(Download)
from pylearn2.datasets import dense_design_matrix
from pylearn2.datasets.cache import datasetCache
from pylearn2.space import VectorSpace, Conv2DSpace, CompositeSpace
 
 
 
        conv2d_space = make_conv2d_space(shape, axes)
        self.topo_space = CompositeSpace((conv2d_space, conv2d_space))
        self.storage_space = VectorSpace(dim=numpy.prod(shape))
 

src/p/y/pylearn2-HEAD/pylearn2/models/dbm/layer.py   pylearn2(Download)
from pylearn2.models import Model
from pylearn2.models.dbm import init_sigmoid_bias_from_marginals
from pylearn2.space import VectorSpace, CompositeSpace, Conv2DSpace, Space
from pylearn2.utils import is_block_gradient
from pylearn2.utils import sharedX, safe_zip, py_integer_types, block_gradient
            WRITEME
        """
        return CompositeSpace((self.output_space, self.h_space))
 
    def get_params(self):
            WRITEME
        """
        return CompositeSpace((self.h_space, self.output_space))
 
    def set_input_space(self, space):
            WRITEME
        """
        return CompositeSpace((self.h_space, self.output_space))
 
    def set_input_space(self, space):
            component.set_input_space(cur_space)
 
        self.output_space = CompositeSpace([ component.get_output_space() for component in self.components ])
 
    def make_state(self, num_examples, numpy_rng):

src/p/y/pylearn2-HEAD/pylearn2/monitor.py   pylearn2(Download)
from pylearn2.config import yaml_parse
from pylearn2.datasets.dataset import Dataset
from pylearn2.space import Space, CompositeSpace, NullSpace
from pylearn2.utils import function, sharedX, safe_zip, safe_izip
from pylearn2.utils.iteration import is_stochastic
            input_sources.append(channel.data_specs[1])
 
        nested_space = CompositeSpace(input_spaces)
        nested_source = tuple(input_sources)
 
        flat_source = self._data_specs_mapping.flatten(nested_source,
                                                       return_tuple=True)
        self._flat_data_specs = (CompositeSpace(flat_space), flat_source)
 
    def set_theano_function_mode(self, mode):
                data_specs = (NullSpace(), '')
            elif len(ipt) == 0:
                data_specs = (CompositeSpace([]), ())
            elif hasattr(dataset, 'get_data_specs'):
                dataset_space, dataset_source = dataset.get_data_specs()
        sources.append(m_source)
 
        nested_space = CompositeSpace(spaces)
        nested_sources = tuple(sources)
 

src/p/y/pylearn2-HEAD/pylearn2/models/mlp.py   pylearn2(Download)
from pylearn2.monitor import get_monitor_doc
from pylearn2.expr.nnet import pseudoinverse_softmax_numpy
from pylearn2.space import CompositeSpace
from pylearn2.space import Conv2DSpace
from pylearn2.space import Space
            The data specifications for both inputs and targets.
        """
        space = CompositeSpace((self.get_input_space(),
                                self.get_output_space()))
        source = (self.get_input_source(), self.get_target_source())
        This is useful if cost_from_X is used in a MethodCost.
        """
        space = CompositeSpace((self.get_input_space(),
                                self.get_output_space()))
        source = (self.get_input_source(), self.get_target_source())
 
        self.input_space = space
        self.output_space = CompositeSpace(tuple(layer.get_output_space()
                                                 for layer in self.layers))
 

src/p/y/pylearn2-HEAD/pylearn2/utils/data_specs.py   pylearn2(Download)
See :ref:`data_specs` for a high level overview of the relevant concepts.
"""
from pylearn2.space import CompositeSpace, NullSpace, Space
from pylearn2.utils import safe_zip
 
            return tuple(rval)
        elif isinstance(nested, Space):
            return CompositeSpace(rval)
 
    def _make_nested_tuple(self, flat, mapping):
                return flat
        else:
            return CompositeSpace([
                    self._make_nested_space(flat, sub_mapping)
                    for sub_mapping in mapping])

src/p/y/pylearn2-HEAD/pylearn2/costs/cost.py   pylearn2(Download)
from pylearn2.utils import safe_zip
from pylearn2.utils import safe_union
from pylearn2.space import CompositeSpace, NullSpace
from pylearn2.utils.data_specs import DataSpecsMapping
 
 
        # Build composite space representing all inputs
        composite_space = CompositeSpace(spaces)
        sources = tuple(sources)
        return (composite_space, sources)
        """
        if self.supervised:
            space = CompositeSpace([model.get_input_space(),
                                    model.get_output_space()])
            sources = (model.get_input_source(), model.get_target_source())

src/p/y/pylearn2-HEAD/pylearn2/training_algorithms/bgd.py   pylearn2(Download)
from pylearn2.termination_criteria import TerminationCriterion
from pylearn2.utils import sharedX
from pylearn2.space import CompositeSpace, NullSpace
from pylearn2.utils.data_specs import DataSpecsMapping
from pylearn2.utils.rng import make_np_rng
                    "the cost does not actually use data from the data set. "
                    "data_specs: %s" % str(data_specs))
        flat_data_specs = (CompositeSpace(space_tuple), source_tuple)
 
        iterator = dataset.iterator(mode=train_iteration_mode,

src/p/y/pylearn2-HEAD/pylearn2/training_algorithms/sgd.py   pylearn2(Download)
 
from pylearn2.monitor import Monitor
from pylearn2.space import CompositeSpace, NullSpace
from pylearn2.train_extensions import TrainExtension
from pylearn2.training_algorithms.training_algorithm import TrainingAlgorithm
                    "the cost does not actually use data from the data set. "
                    "data_specs: %s" % str(data_specs))
        flat_data_specs = (CompositeSpace(space_tuple), source_tuple)
 
        iterator = dataset.iterator(mode=self.train_iteration_mode,

src/p/y/pylearn2-HEAD/pylearn2/costs/mlp/missing_target_cost.py   pylearn2(Download)
import theano.tensor as T
from pylearn2.costs.cost import Cost
from pylearn2.space import CompositeSpace
 
 
            WRITEME
        """
        space = CompositeSpace([model.get_input_space(), model.get_output_space()])
        sources = (model.get_input_source(), model.get_target_source())
        return (space, sources)

  1 | 2  Next