def _commnet(self, n, dense, hidden_size, n_step=2):
        """ CommNet Learning Multiagent Communication with Backpropagation by S. Sukhbaatar et al. NIPS 2016

        Parameters
        ----------
        n: int
            number of agent
        hidden_size: int
        n_step: int
            communication step

        Returns
        -------
        h: tf.tensor
            hidden units after CommNet
        """
        skip = dense

        h = dense
        for i in range(n_step):
            h = self._commnet_block(n, h, skip, "step_%d" % i, hidden_size)

        return h
 CommNet Learning Multiagent Communication with Backpropagation by S. Sukhbaatar et al. NIPS 2016

        Parameters
        ----------
        n: int
            number of agent
        hidden_size: int
        n_step: int
            communication step

        Returns
        -------
        h: tf.tensor
            hidden units after CommNet
        
python/magent/builtin/tf_model/a2c.py