class_docstr: Boolean/Bernoulli Restricted Boltzmann Machine (RBM).
  Algorithm assumes that inputs are either binary
  values or values between 0 and 1.
  
  Parameters
  ----------
  n_visible : int
      Number of visible units. Number of features (columns)
      in the input data.
  
  n_hidden : int
      Number of hidden units. The large the number the more
      information network can capture from the data, but it
      also mean that network is more likely to overfit.
  
  batch_size : int
      Size of the mini-batch. Defaults to ``10``.
  
  weight : array-like, Tensorfow variable, Initializer or scalar
      Default initialization methods
      you can find :ref:`here <init-methods>`.
      Defaults to :class:`Normal <neupy.init.Normal>`.
  
  hidden_bias : array-like, Tensorfow variable, Initializer or scalar
      Default initialization methods
      you can find :ref:`here <init-methods>`.
      Defaults to :class:`Constant(value=0) <neupy.init.Constant>`.
  
  visible_bias : array-like, Tensorfow variable, Initializer or scalar
      Default initialization methods
      you can find :ref:`here <init-methods>`.
      Defaults to :class:`Constant(value=0) <neupy.init.Constant>`.
  
  {BaseNetwork.Parameters}
  
  Methods
  -------
  train(X_train, epochs=100)
      Trains network.
  
  predict(X)
      Alias to the ``visible_to_hidden`` method.
  
  visible_to_hidden(visible_input)
      Propagates data through the network and returns output
      from the hidden layer.
  
  hidden_to_visible(hidden_input)
      Propagates output from the hidden layer backward
      to the visible.
  
  gibbs_sampling(visible_input, n_iter=1)
      Makes Gibbs sampling ``n`` times using visible input.
  
  {BaseSkeleton.fit}
  
  Examples
  --------
  >>> import numpy as np
  >>> from neupy import algorithms
  >>>
  >>> data = np.array([
  ...     [1, 0, 1, 0],
  ...     [1, 0, 1, 0],
  ...     [1, 0, 0, 0],  # incomplete sample
  ...     [1, 0, 1, 0],
  ...
  ...     [0, 1, 0, 1],
  ...     [0, 0, 0, 1],  # incomplete sample
  ...     [0, 1, 0, 1],
  ...     [0, 1, 0, 1],
  ...     [0, 1, 0, 1],
  ...     [0, 1, 0, 1],
  ... ])
  >>>
  >>> rbm = algorithms.RBM(n_visible=4, n_hidden=1)
  >>> rbm.train(data, epochs=100)
  >>>
  >>> hidden_states = rbm.visible_to_hidden(data)
  >>> hidden_states.round(2)
  array([[ 0.99],
         [ 0.99],
         [ 0.95],
         [ 0.99],
         [ 0.  ],
         [ 0.01],
         [ 0.  ],
         [ 0.  ],
         [ 0.  ],
         [ 0.  ]])
  
  References
  ----------
  [1] G. Hinton, A Practical Guide to Training Restricted
      Boltzmann Machines, 2010.
      http://www.cs.toronto.edu/~hinton/absps/guideTR.pdf
class_docstr_tok: ["Boolean\/Bernoulli","Restricted","Boltzmann","Machine","(","RBM",")",".","Algorithm","assumes","that","inputs","are","either","binary","values","or","values","between","0","and","1",".","Parameters","--","--","--","--","--","n_visible",":","int","Number","of","visible","units",".","Number","of","features","(","columns",")","in","the","input","data",".","n_hidden",":","int","Number","of","hidden","units",".","The","large","the","number","the","more","information","network","can","capture","from","the","data",",","but","it","also","mean","that","network","is","more","likely","to","overfit",".","batch_size",":","int","Size","of","the","mini-batch",".","Defaults","to","``","10","``",".","weight",":","array-like",",","Tensorfow","variable",",","Initializer","or","scalar","Default","initialization","methods","you","can","find",":","ref",":","`","here","<","init-methods",">","`",".","Defaults","to",":","class",":","`","Normal","<","neupy.init.Normal",">","`",".","hidden_bias",":","array-like",",","Tensorfow","variable",",","Initializer","or","scalar","Default","initialization","methods","you","can","find",":","ref",":","`","here","<","init-methods",">","`",".","Defaults","to",":","class",":","`","Constant","(","value=0",")","<","neupy.init.Constant",">","`",".","visible_bias",":","array-like",",","Tensorfow","variable",",","Initializer","or","scalar","Default","initialization","methods","you","can","find",":","ref",":","`","here","<","init-methods",">","`",".","Defaults","to",":","class",":","`","Constant","(","value=0",")","<","neupy.init.Constant",">","`",".","{","BaseNetwork.Parameters","}","Methods","--","--","--","-","train","(","X_train",",","epochs=100",")","Trains","network",".","predict","(","X",")","Alias","to","the","``","visible_to_hidden","``","method",".","visible_to_hidden","(","visible_input",")","Propagates","data","through","the","network","and","returns","output","from","the","hidden","layer",".","hidden_to_visible","(","hidden_input",")","Propagates","output","from","the","hidden","layer","backward","to","the","visible",".","gibbs_sampling","(","visible_input",",","n_iter=1",")","Makes","Gibbs","sampling","``","n","``","times","using","visible","input",".","{","BaseSkeleton.fit","}","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","neupy","import","algorithms",">",">",">",">",">",">","data","=","np.array","(","[","...","[","1",",","0",",","1",",","0","]",",","...","[","1",",","0",",","1",",","0","]",",","...","[","1",",","0",",","0",",","0","]",",","#","incomplete","sample","...","[","1",",","0",",","1",",","0","]",",","...","...","[","0",",","1",",","0",",","1","]",",","...","[","0",",","0",",","0",",","1","]",",","#","incomplete","sample","...","[","0",",","1",",","0",",","1","]",",","...","[","0",",","1",",","0",",","1","]",",","...","[","0",",","1",",","0",",","1","]",",","...","[","0",",","1",",","0",",","1","]",",","...","]",")",">",">",">",">",">",">","rbm","=","algorithms.RBM","(","n_visible=4",",","n_hidden=1",")",">",">",">","rbm.train","(","data",",","epochs=100",")",">",">",">",">",">",">","hidden_states","=","rbm.visible_to_hidden","(","data",")",">",">",">","hidden_states.round","(","2",")","array","(","[","[","0.99","]",",","[","0.99","]",",","[","0.95","]",",","[","0.99","]",",","[","0",".","]",",","[","0.01","]",",","[","0",".","]",",","[","0",".","]",",","[","0",".","]",",","[","0",".","]","]",")","References","--","--","--","--","--","[","1","]","G.","Hinton",",","A","Practical","Guide","to","Training","Restricted","Boltzmann","Machines",",","2010.","http",":","\/\/www.cs.toronto.edu\/~hinton\/absps\/guideTR.pdf"]
docstr: Train RBM.
  
  Parameters
  ----------
  X_train : 1D or 2D array-like
  X_test : 1D or 2D array-like or None
      Defaults to ``None``.
  epochs : int
      Number of training epochs. Defaults to ``100``.
docstr_tok: ["Train","RBM",".","Parameters","--","--","--","--","--","X_train",":","1D","or","2D","array-like","X_test",":","1D","or","2D","array-like","or","None","Defaults","to","``","None","``",".","epochs",":","int","Number","of","training","epochs",".","Defaults","to","``","100","``","."]
code: def train(self, X_train, X_test=None, epochs=100):
      """
      Train RBM.
  
      Parameters
      ----------
      X_train : 1D or 2D array-like
      X_test : 1D or 2D array-like or None
          Defaults to ``None``.
      epochs : int
          Number of training epochs. Defaults to ``100``.
      """
      return super(RBM, self).train(
          X_train=X_train,
          y_train=None,
          X_test=X_test,
          y_test=None,
          epochs=epochs,
      )
  
imports: import numpy
  import tensorflow
  from neupy.core.config import DumpableObject
  from neupy.core.properties import IntProperty, ParameterProperty
  from neupy.algorithms.base import BaseNetwork
  from neupy.utils import asfloat, format_data, dot, iters, tf_utils
  from neupy import init
label_desc: Use image node_id 4 for calling the RBM obj's underlying member method code with example usage: obj.train(X_train, X_test, epochs) and returns: super