def __init__(self, obs_shape: int, action_shape: int) -> None:
        """
        **Overview**:
            The definition of continuous action policy network used in PPO, which is mainly composed of three parts: encoder, mu and log_sigma.
        """
        # PyTorch necessary requirements for extending ``nn.Module`` . Our network should also subclass this class.
        super(ContinuousPolicyNetwork, self).__init__()
        # Define encoder module, which maps raw state into embedding vector.
        # It could be different for various state, such as Convolution Neural Network (CNN) for image state and Multilayer perceptron (MLP) for vector state, respectively.
        # Here we use two-layer MLP for vector state.
        # $$ y = max(W_2 max(W_1x+b_1, 0) + b_2, 0)$$
        self.encoder = nn.Sequential(
            nn.Linear(obs_shape, 16),
            nn.ReLU(),
            nn.Linear(16, 32),
            nn.ReLU(),
        )
        # Define mu module, which is a FC and outputs the argument mu for gaussian distribution.
        # $$ \mu = Wx + b $$
        self.mu = nn.Linear(32, action_shape)
        # Define log_sigma module, which is a learnable parameter but independent to state.
        # Here we set it as log_sigma for the convenience of optimization and usage. You can also adjust its initial value for your demands.
        # $$\sigma = e^w$$
        self.log_sigma = nn.Parameter(torch.zeros(1, action_shape))

        **Overview**:
            The definition of continuous action policy network used in PPO, which is mainly composed of three parts: encoder, mu and log_sigma.
        
chapter2_action/continuous_tutorial.py