def load_model(self, shape, gibbs_sampling_steps, model_path):
        """Load a trained model from disk.

        The shape of the model (num_visible, num_hidden) and the number
        of gibbs sampling steps must be known in order to restore the model.
        :param shape: tuple(num_visible, num_hidden)
        :param gibbs_sampling_steps:
        :param model_path:
        :return: self
        """
        n_features, self.num_hidden = shape[0], shape[1]
        self.gibbs_sampling_steps = gibbs_sampling_steps

        self.build_model(n_features)

        init_op = tf.global_variables_initializer()
        self.tf_saver = tf.train.Saver()

        with tf.Session() as self.tf_session:

            self.tf_session.run(init_op)
            self.tf_saver.restore(self.tf_session, model_path)
Load a trained model from disk.

        The shape of the model (num_visible, num_hidden) and the number
        of gibbs sampling steps must be known in order to restore the model.
        :param shape: tuple(num_visible, num_hidden)
        :param gibbs_sampling_steps:
        :param model_path:
        :return: self
        
yadlt/models/boltzmann/rbm.py