Implement ffn(x, W1, b1, W2, b2, dropout_p=0.1, seed=42): a position-wise feed-forward block with dropout and a residual connection.
W1 is (d_hidden, d_in), W2 is (d_in, d_hidden)).np.random.seed(seed), draw np.random.rand once per element of , keep the elements whose draw is and scale the kept ones by .