Exemplo n.º 1
0
 def __init__(self, n_visible, n_hidden, nonlinearity="sigmoid"):
     NADE.__init__(self, n_visible, n_hidden, nonlinearity)
     self.add_parameter(TensorParameter("W", (n_visible, n_hidden), theano=True), optimise=True, regularise=True)
     self.add_parameter(TensorParameter("b", (n_hidden), theano=True), optimise=True, regularise=False)
     self.add_parameter(TensorParameter("V", (n_visible, n_hidden), theano=True), optimise=True, regularise=False)
     self.add_parameter(TensorParameter("c", (n_visible), theano=True), optimise=True, regularise=False)
     self.recompile()
Exemplo n.º 2
0
 def __init__(self, n_visible, n_hidden, nonlinearity="RLU"):
     NADE.__init__(self, n_visible, n_hidden, nonlinearity)
     self.add_parameter(TensorParameter("W", (n_visible, n_hidden), theano=True), optimise=True, regularise=True)
     self.add_parameter(TensorParameter("V", (n_visible, n_hidden), theano=True), optimise=True, regularise=False)
     self.add_parameter(TensorParameter("b", (n_visible), theano=True), optimise=True, regularise=False)
     self.add_parameter(TensorParameter("activation_rescaling", (n_visible), theano=True), optimise=False, regularise=False)
     self.recompile()
Exemplo n.º 3
0
 def __init__(self, n_visible, n_hidden, n_layers, nonlinearity="RLU"):
     NADE.__init__(self, n_visible, n_hidden, nonlinearity)
     self.add_parameter(SizeParameter("n_layers"))
     self.n_layers = n_layers
     self.add_parameter(TensorParameter("Wflags", (n_visible, n_hidden), theano=True), optimise=True, regularise=True)
     self.add_parameter(TensorParameter("W1", (n_visible, n_hidden), theano=True), optimise=True, regularise=True)
     self.add_parameter(TensorParameter("b1", (n_hidden), theano=True), optimise=True, regularise=False)
     if self.n_layers > 1:
         self.add_parameter(TensorParameter("Ws", (n_layers, n_hidden, n_hidden), theano=True), optimise=True, regularise=True)
         self.add_parameter(TensorParameter("bs", (n_layers, n_hidden), theano=True), optimise=True, regularise=False)
     self.add_parameter(TensorParameter("V", (n_visible, n_hidden), theano=True), optimise=True, regularise=True)
     self.add_parameter(TensorParameter("c", (n_visible), theano=True), optimise=True, regularise=False)
     self.setup_n_orderings(1)
     self.recompile()