QA Official

keras Chinese Document Notebook 17-Keras as the Thin Interface of tensorflow

https://qaofficial.com/post/2019/05/04/24845-keras-chinese-document-notebook-17-keras-as-the-thin-interface-of-tensorflow.html 2019-05-04
Keras as Thin Interface of tensorflow Call Keras Layer in tensorflow let's start with a simple example: MNIST numerical classification.We will construct a classifier of TensorFlow by stacking Keras' full connection layers. import tensorflow as tf sess = tf.Session() from keras import backend as K K.set_session(sess) Then, we started to build the model with tensorflow: # this placeholder will contain our input digits, as flat vectors img = tf.placeholder(tf.float32, shape=(None, 784)) Keras can accelerate the definition process of the model:

keras How to Save the Model

https://qaofficial.com/post/2019/05/04/24858-keras-how-to-save-the-model.html 2019-05-04
use model.save(filepath) to save the Keras model and weights in an HDF5 file that will contain: 模型的结构,以便重构该模型 模型的权重 训练配置(损失函数,优化器等) 优化器的状态,以便于从上次训练中断的地方开

keras Learning Notes (II): Realizing FIA Formula 1 World Championship _ Score (Multi-classification, Two-classification)

https://qaofficial.com/post/2019/05/04/24947-keras-learning-notes-ii-realizing-fia-formula-1-world-championship-_-score-multi-classification-two-classification.html 2019-05-04
Two Methods Easy to Google First: 1. Construct metrics This method is suitable for binary classification and can be used as metrics during model training.A fixed threshold of 0.5 is used. from keras import backend as K def f1(y_true, y_pred): def recall(y_true, y_pred): """Recall metric. Only computes a batch-wise average of recall. Computes the recall, a metric for multi-label classification of how many relevant items are selected. """ true_positives =

keras Usage Problem Summary 1

https://qaofficial.com/post/2019/05/04/24906-keras-usage-problem-summary-1.html 2019-05-04
This article mainly introduces the question-and-answer part of Keras. In fact, it is very simple. It may not be mentioned in detail later. Let's cool it down in advance for easy reading. Keras Introduction: Keras is an extremely simplified and highly modular third-party library of neural networks.Based on Python+Theano development, GPU and Central Processor operations are fully utilized.The purpose of its development is to do neural network experiments faster.

keras freezes the specified layer (set to untraceable/trainable)

https://qaofficial.com/post/2019/05/04/24840-keras-freezes-the-specified-layer-set-to-untraceable/trainable.html 2019-05-04
Fine-tune freezes the specified layer fine-tune some public models, because our own number of task categories will be different from the number of categories of public models, the usual approach is to change the last layer of the model and retrain the model weights before fixing the full connection layer As in the following example, we use the inceptionV3 model as the base model, followed by a convolution layer of

keras' EarlyStopping callbacks' Use and Skills

https://qaofficial.com/post/2019/05/04/24900-kerasamp#x27-earlystopping-callbacksamp%23x27-use-and-skills.html 2019-05-04
This article is the author's experience in using EarlyStopping, many of which are the author's own thoughts. Please discuss and comment.Please refer to the official documents and source code for the specific use of EarlyStop. EarlyStopping is what EarlyStopping is one of Callbacks, which is used to specify which specific operation is performed at the beginning and end of each epoch.Callbacks has some set interfaces that can be used directly, such as 'acc','val_acc','loss' and 'val_loss'.

keras_ Sequential model

https://qaofficial.com/post/2019/05/04/24880-keras_-sequential-model.html 2019-05-04
序惯模型是多个网络层的线性堆叠。 可以通过Sequential模型传递一个layer的list来构造该模型: from keras.models import Sequential from keras.layers import Dense,Activation model =Sequential([ Dense(32,units=784), Activation('relu'), Dense(10) Activation('softmax'), ]) 也可

kerkee's Quick Start Guide on Android

https://qaofficial.com/post/2019/05/04/24899-kerkeeamp#x27s-quick-start-guide-on-android.html 2019-05-04
kerkee is a multi-agent coexistence Hybrid framework with cross-platform, good user experience, high performance, good scalability, strong flexibility, easy maintenance, standardization, integration of cloud services, Debug environment, and thorough solution of cross-domain problems. Address on GitHub: https://github.com/kercer/kerkee_androidAddress on OSChina: https://git.oschina.net/zihong/kerkee_android.gitOfficial website address: http://www.kerkee.com kerkee's native part currently supports Android and iOS platforms. the architecture design and interface design of the two platforms are consistent, which greatly reduces the cross-platform cost.

numpy Introduction and KNN Classification Algorithm Using keras

https://qaofficial.com/post/2019/05/04/24819-numpy-introduction-and-knn-classification-algorithm-using-keras.html 2019-05-04
Anaconda calculation package integrates numpy, pandas, sklearn, scipy and other modules. numpy is used to process large matrices, which is much more efficient than python's own nested list. list can be used as initialization parameter of numpy object, one-dimensional list and nested list can be used, nested list generated by * can be used as parameter of np.array (), and actual np.array will also apply for content according to the

python machine learning library sklearn-feature extraction

https://qaofficial.com/post/2019/05/04/24945-python-machine-learning-library-sklearn-feature-extraction.html 2019-05-04
full stack engineer Development Manual (by Luan Peng) python Data Mining Series Tutorial Note: Feature extraction is quite different from feature selection: the former includes converting arbitrary data (such as text or images) into numerical features that can be used for machine learning.The latter applies these features to machine learning. Load Features from Dictionary Types class DictVectorizer can be used to convert an element array of a standard Python dictionary