import tensorflow as tf

                                    rec_Connectivity=self.rec_Connectivity.eval(session=sess),
                                    output_Connectivity=self.output_Connectivity.eval(session=sess))
            print("Model saved in file: %s" % save_weights_path)

        return (t2 - t1)


    # use a trained model to get test outputs
    def test(self, sess, rnn_in, weights_path = None):
        if(weights_path):
            saver = tf.train.Saver()
            # Restore variables from disk.
            saver.restore(sess, weights_path)
            predictions, states = sess.run([self.predictions, self.states], feed_dict={self.x: rnn_in})
        else:
            predictions, states = sess.run([self.predictions, self.states], feed_dict={self.x: rnn_in})

        return predictions, states

