import tensorflow as tf

            # [batch*n_agents, 1]
            self.q_selected = tf.reduce_sum(tf.multiply(self.q_eval, self.a), axis=1)

            # ------------------ build mixing_net ------------------
            with tf.variable_scope('mixing_net'):
                # [batch, n_agents]
                self.q_concat = tf.reshape(self.q_selected, [-1, self.n_agents])
                self.q_concat_ =tf.reshape(self.q_m_, [-1, self.n_agents]) 

                with tf.variable_scope('eval_hyper'):
                    self.Q_tot = Qmix_mixer(self.q_concat, self.S, self.num_global_s, self.n_agents, 32)

                with tf.variable_scope('target_hyper'):
                    self.Q_tot_ = Qmix_mixer(self.q_concat_, self.S_, self.num_global_s, self.n_agents, 32)

                # with tf.variable_scope('layer_mix_eval'):
                #     lin1 = tf.matmul(tf.reshape(self.q_concat, shape=[-1, 1, self.n_agents]), self.w1) + tf.reshape(self.b1, shape=[-1, 1, 32])
                #     a1 = tf.nn.elu(lin1, name='a1')
                #     self.Q_tot = tf.reshape(tf.matmul(a1, self.w2), shape=[-1, 1]) + self.b2

                # with tf.variable_scope('layer_mix_target'):
                #     lin1_ = tf.matmul(tf.reshape(self.q_concat_, shape=[-1, 1, self.n_agents]), self.w1_) + tf.reshape(self.b1_, shape=[-1, 1, 32])
                #     a1_ = tf.nn.elu(lin1_, name='a1_')
                #     self.Q_tot_ = tf.reshape(tf.matmul(a1_, self.w2_), shape=[-1, 1]) + self.b2_
