How do I tie the input and output embedding parameters?

I have input and output embedding layers. What is the easiest way to tie the parameters? Say,

embed = nn.Embedding(vocab_size, embed_size)

and

linear = nn.Linear(embed_size, vocab_size)