Saturday, July 6, 2024
HomeAI Explained together! 7 frameworks used in machine learning and deep learning

[2023] Explained together! 7 frameworks used in machine learning and deep learning

Deep learning frameworks are important when building models for machine learning , especially deep learning.

This time, we will explain what a framework is in the first place, and the characteristics of famous deep learning frameworks.

Contents

  • What is a framework? Difference from library
    • What is a framework in the first place?
    • Difference from library
  • 7 deep learning frameworks
    • TensorFlow
    • PyTorch
    • Keras
    • Caffe
    • Microsoft Cognitive Toolkit
    • MxNet
    • Chainer
  • Conclusion Which deep learning framework is better to use
    • GitHub star count comparison
    • TensorFlow? PyTorch?

What is a framework? Difference from library

What is a framework in the first place?

A framework is like a template for creating a program.
In the field of machine learning, it is common to use frameworks such as TensorFlow and PyTorch, mainly when creating deep learning models.

For example, if you think about making a car, the framework is an image that you put your favorite tires and steering wheels on the body that has been shaped to some extent.
You can make a car from scratch, but the work is overwhelmingly easier if it is in shape to some extent.

Also, depending on the framework, there are some that have pre-trained famous deep learning models, so even beginners can use it immediately, which is very convenient.

Difference from library

Although the terms library and framework are often used interchangeably, they are distinct.

As mentioned above, a framework is a template for creating a program, whereas a library is like a tool that is needed as needed to create a program.
In the car example above, the tires and steering wheel are the libraries.

Of course, you can also make this from scratch, but it’s easier to use commercially available tires bought at a specialty store.

7 deep learning frameworks

In the case of libraries, we use additional items as needed, but in the case of frameworks, we often create products using one framework, so it is also important to select which framework to use. .

Here, we will briefly summarize the characteristics of each of the famous deep learning frameworks.

TensorFlow

TensorFlow was developed by Google’s Google Brain team in 2015 and is arguably the most popular deep learning framework today.
Since it is a framework developed by Google, the framework used for Gmail, Google Translate, etc. is of course this TensorFlow.

Main features are:

  • Written in C++ and Python
  • Good documentation
  • Also available on mobile platforms such as iOS and Android
  • It has a function called Tensorboard that allows you to observe the training process.

PyTorch

PyTorch was originally developed by Facebook’s artificial intelligence group and released in 2016. PyTorch comes closest to the popularity of TensorFlow mentioned above.

Main features are:

  • Easy to understand syntax
  • Popular among researchers (actual code for models published in papers written in PyTorch is relatively easy to find)
  • Debuggers such as pdb and PyCharm can be used
  • Dynamic computational graph (learning speed is slow, but flexible model construction is possible)

Keras

Keras was developed in 2015 by Francois Chollet (now an engineer at Google). Currently, it is incorporated into TensorFlow and is generally used in the form of tf.keras.
By the way, a commentary book on Keras written by the developer, Francois Chollet himself, has also been published.

Main features are:

  • Models are very easy to build and easy to understand even for beginners
  • Useful for prototyping because it can be implemented quickly
  • Supports multiple backends: TensorFlow , CNTK, and Theano

Caffe

Caffe is a project started by Mr. Yangqing Jia while he was a doctoral student at the University of California, Berkeley.

Main features are:

  • Good at processing such as image recognition
  • Active development community
  • works fast

 

Microsoft Cognitive Toolkit

Developed by Microsoft, as the name suggests, the Microsoft Cognitive Toolkit was originally released in 2016 under the name CNTK, but changed to its current name in October of the same year.
It is also used for Skype, etc.

Its main features are:
・Good resource efficiency
・First support for the ONNX format (a format for exchanging deep learning models between different frameworks)
・Algorithms to minimize performance degradation when processing huge datasets Embedded so complex machines can handle huge datasets
Community not very developed

MxNet

MxNet was developed in collaboration with researchers from various universities such as CMU (Carnegie Mellon University), NYU (New York University), NUS (National University of Singapore), and MIT (Massachusetts Institute of Technology). Amazon Web Service) announced support.

Main features are:

  • high scalability
  • Compatible with mobile devices
  • Supports many languages ​​such as Python , R, Scala, JavaScript, C++
  • It is not very popular among researchers and the community is not that well developed.
  • Imperative and declarative programs can be used together

Chainer

Chainer was developed by PFN (Preferred Networks), a Japanese venture company. In December 2019, it was announced that its development would be completed and that it would be migrated to PyTorch. It made an impact.

Main features are:

  • Popular in Japan
  • Unlike TensorFlow, where the computation graph is defined and then the computation is executed, the computation graph is defined at the same time as the computation, making it easier to reconstruct the model (this leads to dynamic computation graphs such as PyTorch).

Conclusion Which deep learning framework is better to use

We have looked at the characteristics of various deep learning frameworks above, but which framework is actually better to use?

GitHub star count comparison

This time, I compared the number of stars on GitHub as one index to measure the popularity of each framework.
Here are the results.

  • TensorFlow・・・146k
  • PyTorch・・・39.7k
  • Keras・・・48.7k
  • Caffe・・・30.5k
  • Microsoft Cognitive Toolkit (CNTK)・・・16.8k
  • MxNet・・・18.8k
  • Chainer・・・5.4k

If you look at it this way, you can see that TensorFlow and PyTorch have more stars than other frameworks.

This is just one indicator, but the higher the number of stars, the lower the possibility that development will be canceled, and the more peace of mind.

TensorFlow? PyTorch?

Of the popular frameworks, it is a matter of opinion whether to use TensorFlow or PyTorch.

At this stage, TensorFlow tends to be used more often in business, and PyTorch seems to be more commonly used in research.

As I mentioned above, there are some differences, but the number of functions that only one of them has is decreasing. Therefore, which framework is used by more people is also an important criterion for judgment.

At the moment, TensorFlow is more popular than TensorFlow, but as research using PyTorch progresses and the research results are applied to business, the popularity of PyTorch will increase. It may even surpass TensorFlow.

It is quite possible that frameworks other than PyTorch and TensorFlow will grow in popularity due to future updates, so we will keep an eye on future trends.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent Posts

Most Popular

Recent Comments