Convert a piece of code from TensorFlow to PyTorch

please, I want to convert this piece of code from TensorFlow to PyTorch:

with tf.name_scope("embedding"):
            self.embedding_matrix = tf.get_variable(
                    "W", shape=[self.vocab_size, self.embedding_size],
                    initializer=tf.contrib.layers.xavier_initializer(seed=1234))

            self.softmax_biases = tf.Variable(tf.zeros([self.vocab_size]))

How can I do it ? and thank you

Something like this should work:

embedding_matrix = torch.empty([self.vocab_size, self.embedding_size])
torch.nn.init.xavier_normal_(embedding_matrix)
softmax_biases = torch.zeros([self.vocab_size])

Well, thank you very much for your help