Is there any list of mapping functions for converting tensorflow codes to pytorch codes?

I try to convert tensorflow codes to pytorch codes, but I am not familar with tensorflow. Is there any list of mapping functions for converting tensorflow codes to pytorch codes? Something like: tf.reshape<-> torch.reshape

Thank you very much!

Hi,

I do not think so, because there are many functions in PyTorch or TF which are not available in the other one. Also, many of similar functions work differently and use different semantic. Converting TF code to PyTorch needs deep understanding of both libraries which mostly can be achieved by reading documentations.
Although they are some methods for instance converting a model to an intermidate state then converting to another model but codes will be generated automatically which may not be your case.

Bests

1 Like