def posterior_architecture(args):
    """Architecture of the inference network q(r_{1:K}| r_{1:N}, s)."""
    # encoder
    args.q_encoder_hidden_dim = getattr(args, 'q_encoder_hidden_dim', 150)
    args.q_encoder_dropout = getattr(args, 'q_encoder_dropout', 0.1)
    args.q_nlayers = getattr(args, 'q_encoder_nlayers', 2)
    # decoder
    args.q_decoder_embed_dim = args.q_encoder_hidden_dim
    args.q_decoder_learned_pos = getattr(args, 'q_decoder_learned_pos', True)
    args.q_max_positions = getattr(args, 'q_max_positions', 100)
    return args