How can I convert a Deep Learning project from Tensorflow to PyTorch

Please suggest some ideas about how can I convert a pre-existing TensorFlow project to PyTorch.

Hi Samiha!

You should first get an overview of the pytorch architecture. I would
suggest browsing the pytorch documentation, in particular, the tutorials.
The 60-Minute Blitz might be a good place to start.

You will want to have an overview of the “pytorch way” to construct a
neural network, specify a loss function, specify an optimizer, and run
your training loop.

Then start porting your tensorflow code to pytorch. If your tensorflow
project uses 'standard" neural-network building blocks and algorithms,
your should be able to find equivalents for (more or less) everything
in pytroch.

If your tensorflow project uses some custom code (e.g., a non-standard
loss function) or happens to use some building block that hasn’t (yet)
been implemented in pytorch, you will have to write custom pytorch
code for that piece.

Good luck.

K. Frank

@KFrank I need a specific part of the Tensorflow project and integrate that to another Pytorch project. For this purpose, is it necessary to convert the whole Tensorflow project?