Beispiel #1
0
 def __init__(self, dim, name=None, mix=5):
     """Initialize mixture density layer - mix gives the number of Gaussians
     to mix, dim is the dimension of the target(!) vector."""
     nUnits = mix * (dim + 2)  # mean vec + stddev and mixing coeff
     NeuronLayer.__init__(self, nUnits, name)
     self.nGaussians = mix
     self.nDims = dim
Beispiel #2
0
 def __init__(self, dim, name = None, mix=5):
     """Initialize mixture density layer - mix gives the number of Gaussians
     to mix, dim is the dimension of the target(!) vector."""
     nUnits = mix * (dim + 2)  # mean vec + stddev and mixing coeff
     NeuronLayer.__init__(self, nUnits, name)
     self.nGaussians = mix
     self.nDims = dim
Beispiel #3
0
 def __init__(self, dim, name=None):
     NeuronLayer.__init__(self, dim, name)
     # initialize sigmas to 0
     ParameterContainer.__init__(self, dim, stdParams = 0)
     # if autoalpha is set to True, alpha_sigma = alpha_mu = alpha*sigma^2
     self.autoalpha = False
     self.enabled = True
    def __init__(self, dim, module, name=None, onesigma=True):
        NeuronLayer.__init__(self, dim, name)
        self.exploration = zeros(dim, float)
        self.state = None
        self.onesigma = onesigma

        if self.onesigma:
            # one single parameter: sigma
            ParameterContainer.__init__(self, 1)
        else:
            # sigmas for all parameters in the exploration module
            ParameterContainer.__init__(self, module.paramdim)

        # a module for the exploration
        assert module.outdim == dim, (
            "Passed module does not have right dimension")
        self.module = module
        self.autoalpha = False
        self.enabled = True
    def __init__(self, dim, module, name=None, onesigma=True):
        NeuronLayer.__init__(self, dim, name)
        self.exploration = zeros(dim, float)
        self.state = None
        self.onesigma = onesigma

        if self.onesigma:
            # one single parameter: sigma
            ParameterContainer.__init__(self, 1)
        else:
            # sigmas for all parameters in the exploration module
            ParameterContainer.__init__(self, module.paramdim)

        # a module for the exploration
        assert module.outdim == dim, (
            "Passed module does not have right dimension")
        self.module = module
        self.autoalpha = False
        self.enabled = True