Hi Samiha!



 Samiha:

how can I convert a pre-existing TensorFlow project to PyTorch.


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