Tying weights in neural machine translation
Did you check the code that kmario23 shared?  Because it is written that if the hidden size and the embedding sizes are not equal then raise an exception. So, this means if you really want to tie the weights then you should decrease the hidden size of your decoder to 300. 
On the other hand, if you rethink your idea, what you really want to do is to eliminate the weight tying. Why? Because basically, you want to use a transformation which needs another matrix.
I want to tie weights of the embedding layer and the next_word prediction layer of the decoder. The embedding dimension is set to 300 and the hidden size of the decoder is set to 600. Vocabulary size of the target language in NMT is 50000, so embedding weight dimension is 50000 x 300 and weight of the linear layer which predicts the next word is 50000 x 600. 
So, how can I tie them? What will be the best approach to achieve weight tying in this scenario?