import tensorflow as tf

            num_acts = self.act_space

            # Calculate U
            self.worker_lstm = SingleStepLSTM(tf.expand_dims(self.z, [0]),
                                              size=num_acts * self.k,
                                              step_size=tf.shape(self.obs)[:1])
            flat_logits = self.worker_lstm.output

            self.worker_vf = self.build_value(flat_logits)

            U = tf.reshape(flat_logits, [-1, num_acts, self.k])

            # Calculate w
            cut_g = tf.stop_gradient(self.g)
            cut_g = tf.expand_dims(cut_g, [1])
            gstack = tf.concat([self.prev_g, cut_g], axis=1)

            self.last_c_g = gstack[:, 1:]
            # print self.last_c_g
            gsum = tf.reduce_sum(gstack, axis=1)
