Preface
This article will be the latest and most complete evaluation of a depth learning framework since the second half of 2017. The evaluation here is not a simple use evaluation, we will use these five frameworks to complete a depth learning task, from the framework of ease of use, training speed, data preprocessing of the complexity, as well as the size of the video memory footprint to carry out a full range of evaluation, in addition, we will also give a very objective, Very comprehensive use of recommendations. Finally, let me remind you that this article is not just a review, you can even serve as an introductory tutorial for the five major frameworks. 0. Overview of the five broad framework
Before reviewing, let's start with a comprehensive overview of these five frameworks and their current status as a place of development. First of all, in these five frameworks, many people will certainly ask why there is no keras. Why not CNTK. Here I would like to point out that this article is biased towards the industrial level of application evaluation, the main evaluation of the mainstream framework, of course, not to say that Keras and CNTK are not mainstream, the article does not have any interest related things, but the keras itself has a variety of frameworks as the back end, So there is no point in contrast to its back-end frame, Keras is undoubtedly the slowest. and CNTK because the author of Windows is not feeling so also not within the range of evaluation (CNTK is also a good framework, of course, also cross-platform, interested parties can go to trample on the pit).
TensorFlow can be said to be the most active development, TensorFlow currently has 72.3k Star,mxnet is 11.5k,caffe2 is 5.9K, of course caffe2 to launch a little later, mxnet the official GitHub Repo also later transferred to the Apache hatching project. But from the GitHub of attention, no doubt TensorFlow and Mxnet are more optimistic.
Even if I do not do this evaluation, many people also know that these frameworks so far have some of these evaluations: TensorFlow API is more complex, use difficult, messy things a lot, but the ecology is rich, many deep learning models have a TF to achieve, there are Google big guy Plus; Mxnet occupy a small memory, fast, very dapper, has a natural source of open-source genes, entirely by the community-driven framework; Caffe2 is a framework for industrial applications, but later, and the main Python2 (execuse me? 2017 years of the main Python2. And I can't help it. The user experience is not very friendly from the point of view of the installation deployment; Pytorch is a Facebook-oriented framework that is very simple to build a neural network like Keras and MATLAB, but I have to hack it, Each time you have to judge whether it is a GPU or a CPU. (Execuse me?) really should be that sentence, I stepped through the TF pit to know the TF good); Paddlepadddle Baidu Open source of a framework, there are many people in China, my feeling is, very consistent with the use of Chinese habits, but in the practicality of the API has yet to be further strengthened, I have written a blog to get started Paddlepaddle, have to say, Paddlepaddle Chinese document written very clear, hands-on relatively simple paddlepaddle three lines of code from entry to proficient;
The above evaluation is the previous evaluation, mixed with a touch of personal experience, and finally said their respective current good trends: TensorFlow models This model library update very quickly, some of the previous image classification, target detection, image generation text, the generation of confrontation network have ready-made in-depth learning application examples, Including the now updated knowledge map of the question and answer project, neural network programming robot and other projects, these official ecology for a framework is very useful, this is undoubtedly a strength of the TF mxnet as early as a few months ago launched the gluon this interface, plainly is a keras, Packaged a more user-friendly API, but currently can only implement some simple network construction, complex or have to use the native API, here is a tutorial link gluon information, in addition, Mxnet also has an instance warehouse, which has some interesting projects such as speech recognition, But the feeling of implementation is very unfriendly, the code is almost messy; Caffe2 Caffe2 is very weak relative to the previous two, there is no bright spot, say a C + + High speed industrial framework. Apart from blowing up a lot of people can get some useful official use of documents or tutorials out. Not much to say. Pytorch a stroke, in favor of academic rapid implementation, to industrial applications, such as a model to run on the server or on the Android phone or embedded should not be able to; Paddlepaddle is doing well, I stress, paddle is the only one that doesn't configure any third-party libraries, Cloning direct make can be successful framework, by Caffe compiled abused people should be deeply touched by this.
Said so much, I believe you have a general understanding of the current framework, then we use a few of these frameworks to complete the classification of the image of a task, which will include how to import the image of the model, how to write the network, the whole training of pipeline and so on.
Our evaluation of the task is a picture classification, we try any frame only need to create a new folder, such as Mxnet_classifier, the data can be thrown into the, we focus on evaluating the complexity of data preprocessing, and the complexity of the network writing.
Picture Download Address Images.tar, Annotations.tar. After decompression get:
Paddle_test
└──
data
├──
annotation
. Tar
└──
images
. Tar
|
After decompression images each of the following folders is a category of dogs, in fact classified tasks we just need this on it. 1. Mxnet
First play, use Mxnet bar. I suggest you look at the above I posted the gluon li mu da god wrote ppt, including the gluon and other framework differences, as well as mxnet on the multi-GPU training advantages.
Installation is not installed:
sudo pip3
install mxnet
sudo pip3
install mxnet-cu80
sudo
pip3 install MXNET-CU80MKL
|
Respectively is the CPU beggar version, GPU tyrants version, GPU Plus CPU Speed Extreme luxury version. You should clone it. Mxnet source code, from tools inside find im2rec.py This tool, we do pictures, whether it is detection or segmentation or classification, in accordance with the mxnet logic of the picture into a binary rec format.
We now have the images folder, which is written with the im2rec.py processing parameter:
Python3
im2rec
.
PY
standford_dogs
images/--
list
true
-
-
recursive
true
-
-
train
-
ratio
0
.
8
-
-
test
-
ratio
0
.
2
|
This step generates two files: Standford_dogs_train.lst standford_dogs_test.lst
Standford_dogs is the prefix,-list true represents the build list, recursive the user that each folder represents a class of situations, and finally a row in Standford_dogs_train.lst is like this: