def test_independent_ac_network() -> None:
    """
    **Overview**:
        The function of testing independent actor-critic network. Construct a network and pass a batch of data to it.
        Then validate the shape of different parts of output.
    """
    # Set batch size, agent number, observation shape and action shape.
    batch_size = 4
    agent_num = 3
    obs_shape = 10
    action_shape = 5
    # Define a independent actor-critic network.
    network = IndependentActorCriticNetwork(agent_num, obs_shape, action_shape)
    # Generate a batch of local obs data for all agents from the standard normal distribution.
    local_obs = torch.randn(batch_size, agent_num, obs_shape)
    # Actor-critic network forward procedure, pass the local obs data to the network and get the output.
    result = network(local_obs)
    # Validate the shape of output.
    assert result['logit'].shape == (batch_size, agent_num, action_shape)
    assert result['value'].shape == (batch_size, agent_num, 1)

    **Overview**:
        The function of testing independent actor-critic network. Construct a network and pass a batch of data to it.
        Then validate the shape of different parts of output.
    
chapter6_marl/marl_network.py