import tensorflow as tf

                            + tf.matmul(
                                rnn_in,
                                self.W_in * self.input_Connectivity,
                                transpose_b=True, name="2")
                            + self.b_rec)\
                        + np.sqrt(2.0 * self.alpha * self.rec_noise * self.rec_noise)\
                          * tf.random_normal(state.get_shape(), mean=0.0, stddev=1.0)

        return new_state

    def rnn_output(self, new_state):
        if self.dale_ratio:
            new_output = tf.matmul(tf.nn.relu(new_state),
                                    tf.matmul(tf.abs(self.W_out) * self.output_Connectivity,
                                            self.Dale_out, name="in_2"), transpose_b=True, name="3") \
                        + self.b_out
        else:
            new_output = tf.matmul(tf.nn.relu(new_state),
                                self.W_out * self.output_Connectivity, transpose_b=True, name="3") \
                        + self.b_out

        return new_output

    def rnn_step_scan(self, state, rnn_in):
