示例#1
0
文件: mlp.py 项目: artivis/couscous
 def __init__(self, rng, srng, dropout_rate, input, d_in, d_out,
         W=None, b=None, activation=T.tanh):
     """
     Apart from the `srng` and `dropout_rate`, the parameters are
     identical to those of `HiddenLayer`.
     """
     super(DropoutHiddenLayer, self).__init__(
         rng=rng, input=input, d_in=d_in, d_out=d_out, W=W, b=b,
         activation=activation
         )
     self.output = theano_utils.apply_dropout(srng, self.output, p=dropout_rate)
示例#2
0
文件: cnn.py 项目: artivis/couscous
 def __init__(self, rng, srng, dropout_rate, input, input_shape,
         filter_shape, pool_shape=(2, 2), activation=T.tanh, W=None,
         b=None):
     """
     Apart from the `srng` and `dropout_rate`, the parameters are
     identical to those of `ConvMaxPoolLayer`.
     """
     super(DropoutConvMaxPoolLayer, self).__init__(
         rng, input, input_shape, filter_shape, pool_shape, activation, W, b
         )
     self.output = theano_utils.apply_dropout(srng, self.output, p=dropout_rate)
示例#3
0
文件: cnn.py 项目: zzdxlee/couscous
 def __init__(self,
              rng,
              srng,
              dropout_rate,
              input,
              input_shape,
              filter_shape,
              pool_shape=(2, 2),
              activation=T.tanh,
              W=None,
              b=None):
     """
     Apart from the `srng` and `dropout_rate`, the parameters are
     identical to those of `ConvMaxPoolLayer`.
     """
     super(DropoutConvMaxPoolLayer,
           self).__init__(rng, input, input_shape, filter_shape, pool_shape,
                          activation, W, b)
     self.output = theano_utils.apply_dropout(srng,
                                              self.output,
                                              p=dropout_rate)