Gradient recently published a blog that prominently shows the rise and adoption of PyTorch in academia (based on the number of papers published on CVPR, ICRL, ICML, NIPS, ACL, ICCV, etc.). The data shows that PyTorch is clearly a minority in 2018, and compared to 2019, it has been unanimously welcomed by researchers in academic research.
TensorFlow was first developed by the Google Brain team in 2015 and is currently used by Google for academic research and production purposes.
On the other hand, PyTorch was originally developed by Facebook based on the popular Torch framework and was originally a premium alternative to NumPy. However, in early 2018, Caffe2 (a convolution architecture for rapid feature embedding) was merged into PyTorch, effectively shifting the focus of PyTorch into the field between data analysis and deep learning. PyTorch is one of the latest deep learning frameworks and is popular because of its simplicity and ease of use. Pytorch is very popular because of its dynamic computation graph and effective memory usage. Dynamic graphs are ideal for certain use cases, such as processing text. Pytorch is easy to learn and easy to code.
TensorFlow is widely used and provides strong support in the community/forum. The TensorFlow team also released TensorFlow Lite, which can run on mobile devices.