QA Official

Keras for Iris dataset classification

https://qaofficial.com/post/2019/03/29/24599-keras-for-iris-dataset-classification.html 2019-03-29
Keras for Iris dataset classification Python Implements Classification Code Keras Neural Network-Classification Problem. # -*- coding: utf-8 -*- import numpy as np # 用来做矩阵运算 import pandas as pd # 用来做数据分析 from keras.models import Sequential # 模型&序列串行的类 from keras.layers import Dense # 隐含层的节

Linux Setting python3.5+Keras

https://qaofficial.com/post/2019/03/29/24381-linux-setting-python3.5-keras.html 2019-03-29
1. Directly execute these two commands:sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150To switch to Python2, perform:sudo update-alternatives --config python 2. Installing Keras $ sudo pip install --upgrade keras

faster-rcnn Learning Notes (1)

https://qaofficial.com/post/2019/03/29/23888-faster-rcnn-learning-notes-1.html 2019-03-29
Status quo: I don't know much about the underlying code of CAFE, I have limited knowledge about the architecture of CAFE, and I know more about the design ideas of CAFE. I want to learn caffe carefully for the next period of time, but at present, the faster-rcnn attached to caffe is the one that deals most with in-depth learning. let's first learn the whole process of faster-rcnn and the

keras Learning II: Application of Neural Network Model

https://qaofficial.com/post/2019/03/29/24889-keras-learning-ii-application-of-neural-network-model.html 2019-03-29
Introduction keras provides two models, one is Sequential, which translates into a sequential model.The other is Functional, which translates into a functional model.The two can be distinguished from each other by their usage form. The sequence model can be regarded as an object-oriented method, and a series of objects cooperate to complete the task.The function model is a series of procedure calls to complete the task. The concept ofsequence model

keras model for prediction considerations

https://qaofficial.com/post/2019/03/29/24888-keras-model-for-prediction-considerations.html 2019-03-29
Why is the training error much higher than the test error? A Keras model has two modes: training mode and testing mode.Some regular mechanisms, such as Dropout, L1/L2 regular items will not be enabled in test mode. In addition, the training error is the average of the errors of each batch of training data.In the training process, the error of batch at the beginning of each epoch is larger, while the error of the following batch is smaller.

keras parameter adjustment, optimization, some settings, etc

https://qaofficial.com/post/2019/03/29/24849-keras-parameter-adjustment-optimization-some-settings-etc.html 2019-03-29
1. Turn off GPU and only use CPU Before importtensorflow, add: import os os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # see issue #152 os.environ["CUDA_VISIBLE_DEVICES"] = Specifies which GPU to use import os os.environ["CUDA_VISIBLE_DEVICES"] = "2"2. Set the proportion of GPU memory occupied by keras: import os import tensorflow as tf import keras.backend.tensorflow_backend as K def get_session(gpu_fraction=0.3): '''Assume that you have 6GB of GPU memory and want to allocate ~2GB''' num_threads = os.environ.get('OMP_NUM_THREADS') gpu_options

pytorch learning textCNN implementation

https://qaofficial.com/post/2019/03/29/24264-pytorch-learning-textcnn-implementation.html 2019-03-29
I have been learning pytorch recently, so I try to use pytorch to implement textCNN, PS (others on Git implement textCNN).Pytorch is better than tensorflow in that it is easy to learn and suitable for beginners. First of all, we should pay attention to the data preprocessing of this sample. The data I used is the Chinese text classification data set THUCNews, which is generated by filtering historical data from

svm Common Kernel Functions

https://qaofficial.com/post/2019/03/29/24150-svm-common-kernel-functions.html 2019-03-29
SVM kernel function selection plays a vital role in its performance, especially for those linearly inseparable data, so kernel function selection is very important in SVM algorithm.As for the kernel technique, we know that its purpose is to make the data separable in the feature space by mapping the linearly inseparable data in the input space into a high latitude feature space. We define this mapping as (x) \ phi (x), then we can change the solution of constrained optimization problem into \begin{matrix}min_\alpha & \frac12\sum_{i = 1}^N\sum_{j = 1}^N\alpha_i \alpha_jy_iy_j(\phi_i\cdot\phi_j) - \sum_{i=1}^N\alpha_i \\s.

vue Life Cycle Details

https://qaofficial.com/post/2019/03/29/23643-vue-life-cycle-details.html 2019-03-29
Original Link <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>vue生命周期学习</title> <script src="https://cdn.bootcss.com/vue/2.4.2/vue.js"></script> </head> <body> <div id="app"> <h1>{{message + "---这是在out

(reprint) Quick Start: 30s Hands-on Keras

https://qaofficial.com/post/2019/03/29/23941-reprint-quick-start-30s-hands-on-keras.html 2019-03-29
[ Time ] 2018.10.23 [ Title ] Quick Start: 30s Hands-on Keras [ Reprint Link ] This article is reprinted from " Keras Chinese Document" with the link of https://keras-cn.readthedocs.io/en/latest/ Keras' core data structure is " model", which is a way to organize the network layer.The main model in Keras is the Sequential model, which is a series of stacks formed by network layers in sequence.You can also look at functional models to learn to build more complex models.