[docs]classMLPBase(nn.Module):"""A MLP base module."""def__init__(self,args,obs_shape):super(MLPBase,self).__init__()self.use_feature_normalization=args["use_feature_normalization"]self.initialization_method=args["initialization_method"]self.activation_func=args["activation_func"]self.hidden_sizes=args["hidden_sizes"]obs_dim=obs_shape[0]ifself.use_feature_normalization:self.feature_norm=nn.LayerNorm(obs_dim)self.mlp=MLPLayer(obs_dim,self.hidden_sizes,self.initialization_method,self.activation_func)