How to transfer tf.layers.dense() to pytorch?

How to transfer tf.layers.dense() to pytorch?

tf.layers.dense(post_outputs, hp.num_freq)

Hi,

If you’re looking for the equivalent of tf.layers.dense it is nn.linear
https://pytorch.org/docs/stable/nn.html?highlight=nn%20linear#torch.nn.Linear

1 Like

Thank you!!
I found it!