Tensorflow Vs Pytorch: 3 weeks summary

in #tensorflow6 years ago

TensorFlow is developed by Google Brain and actively used at Google both for research and production needs. PyTorch is a cousin of lua-based Torch framework which is actively used at Facebook. PyTorch is dynamic computation graphs while Tensorflow is the static computation.    

 Installation:  

  1. The installation is very easy and straightforward.      PyTorch can be installed via PIP.
  2. There isn't a designated CPU and GPU version of PyTorch      like there is with TensorFlow.
  3. PyTorch does not offer an official window distribution      yet. There are non-official ports to windows, but there is no support from      PyTorch.

Data Loading:  

  1. API’s for data loading is well designed in PyTorch.      Parallelism in data loading is as simple as passing a num_workers argument      to the data loader. TensorFlow API’s are verbose and harder to learn

Documentation:   

  1. Documentation is complete for the most part. I never      failed to find the definition of function or module.
  2. Opposed to Tensorflow, where all functions have one      page documentation, PyTorch uses one page one module. This is bit little      difficult.

Community:  

  1. Obviously, community is not as large as Tensorflow.      Though many people enjoying working with PyTorch.
  2. Community is large enough, questions on the official      forums gets quick answers.

Tools and Helpers:  

  1. PyTorch offers a fair amount of tools, some very useful      is still missing such as TensorFlow’s TensorBoard.
  2. We can draw graphs with Matplotlib or seaborn libraries      in PyTorch. This needs a bit more self-written code than Tensorflow.

Deployment:  

  1. For small scale server deployment both are easy to wrap      in Flask web server. For heavily used machine learning services TensorFlow      is the winner. 
  2. For mobile deployment, TensorFlow works.

Device Management:  

  1. TensorFlow assumes you want to run on GPU if one is      available. In PyTorch you have to move explicitly everything onto the      device even if CUDA is enabled. 

Debugging:  

  1. Since computation graph in PyTorch is defined at      runtime we can use our favorite Python debugging tools such as PyCharm      debugger or our old trusty print statement
  2. This is not the case with TensorFlow. You have an      option to use a special tool called tfdbg which allows to evaluate      TensorFlow expressions at runtime and browse all tensors and operations in      session scope. Of course, we won’t be able to debug any python code with      it.
  3. Debugging Pytorch code is just like debugging python      code

Usage:  

  1. PyTorch      offers a very Pythonic API. In my opinion, this leads to more, but much      cleaner code.
  2. PyTorch      graphs have to be defined in a class which inherits from the PyTorch      nn.Module class
  3. A      forward() function gets called when the Graph is run.
  4. This      new approach needs some time to get used to, but I think it is very intuitive      if you worked with Python outside the Deep learning before.
  5. Based      on some reviews online, PyTorch also shows better performance on a lot of      model compared to Tensorflow.

PyTorch is an awesome alternative to TensorFlow. Since PyTorch is still in Beta, I except some more changes and improvement to the usability, docs and performance.    PyTorch is very pythonic and feels comfortable to work with it. It is also bit faster than TensorFlow.   

Sort:  

Hola @niki196, upv0t3
Este es un servicio gratuito para nuevos usuarios de steemit, para apoyarlos y motivarlos a seguir generando contenido de valor para la comunidad.
<3 Este es un corazón, o un helado, tu eliges .

: )


N0. R4ND0M:
6791 5378 3324 1381
5654 6542 9602 2378
1748 7405 8347 9808
1487 4919 7216 9395

Congratulations @niki196! You received a personal award!

1 Year on Steemit

Click here to view your Board of Honor

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @niki196! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.16
TRX 0.13
JST 0.027
BTC 58394.86
ETH 2618.86
USDT 1.00
SBD 2.39