QA Official

TensorFlow-RNN Recurrent Neural Network Example 2: Sentiment analysis

https://qaofficial.com/post/2019/05/02/24406-tensorflow-rnn-recurrent-neural-network-example-2-sentiment-analysis.html 2019-05-02
TensorFlow-RNN Sentiment analysis Previously wrote a Sentiment analysis http://blog.csdn.net/weiwei9363/article/details/78357670 using fully connected neural networks Now, use TensorFlow to build an RNN network for sentiment analysis of text complete code and detailed solution https://github.com/jiemojimo/deep-learning/tree/master/sentin-rnn training data https://github.com/jiemojimo/deep-learning/tree/master/sentin-network Step 1 Data Processing import numpy as np # 读取数据 with open('reviews.txt', 'r') as f: reviews = f.read() with open('labels.txt', 'r') as f: labels = f.read() # 每一个 \n

Tensorflow loss function and Custom Loss Function (3)

https://qaofficial.com/post/2019/05/02/24468-tensorflow-loss-function-and-custom-loss-function-3.html 2019-05-02
I mainly divided into three articles to introduce tensorflow's loss function. This article is tensorflow's custom loss function.(A) tensorflow built-in four loss functions(2) Other loss functions(3) custom loss function Self-defined loss function is the end of the chapter on loss function. Learning self-defined loss function is very helpful to improve the accuracy of classification, segmentation and other issues. At the same time, exploring new loss function can also make you

Tensorflow loss function and Custom Loss Function (I)

https://qaofficial.com/post/2019/05/02/24460-tensorflow-loss-function-and-custom-loss-function-i.html 2019-05-02
I mainly divided into three articles to introduce tensorflow's loss function, this is tensorflow built-in four loss functions (a) tensorflow built-in four loss functions(2) Other loss functions(3) custom loss function loss function quantifies the difference between the results (predicted values) output by the classifier and the results (labels) we expect, which is as important as the classifier structure itself.There are many scholars who devote themselves to discussing how to improve the loss function so as to optimize the results of the classifier.

keras custom loss loss function, sample weighted sum metric on loss

https://qaofficial.com/post/2019/05/02/24458-keras-custom-loss-loss-function-sample-weighted-sum-metric-on-loss.html 2019-05-02
First differentiate and analyze the concept: 1. loss is the goal of the optimization of the whole network and needs to participate in the optimization operation and update the weight W. 2. metric is only used as an "indicator" to evaluate the performance of the network, such as accuracy, in order to intuitively understand the effect of the algorithm, act as view, and do not participate in the optimization process

logistic Regression Detailed Explanation (II): Detailed Explanation of cost function

https://qaofficial.com/post/2019/05/02/24553-logistic-regression-detailed-explanation-ii-detailed-explanation-of-cost-function.html 2019-05-02
supervised learning Machine learning is divided into supervised learning, unsupervised learning, semi-supervised learning and reinforcement learning.For logical regression, it is a typical supervised learning.Since it is supervised learning, the training set can naturally be expressed as follows:\{(x^1,y^1),(x^2,y^2),\cdots,(x^m,y^m)\} For these M training samples, each sample itself has N-dimensional characteristics.Plus an offset x0x_0, each sample contains n+1 dimensional features:x = [x_0,x_1,x_2,\cdots,x_n]^TWhere x ∈ rn+1x \ in r {n+1}, x0 = 1x _ 0 = 1, y ∈ {0,1} y \ in \ {0,1 \}

python Reads json Files and Other Processes

https://qaofficial.com/post/2019/05/02/24365-python-reads-json-files-and-other-processes.html 2019-05-02
Three pandas Read json Files from pandas.io.json import json_normalize import pandas as pd import json import time # 读入数据 data_str = open('AgriculturalDisease_train_annotations.json').read() #———————————————————— 测试json_normalize ————————

(keras)-custom objective function (loss function) in keras

https://qaofficial.com/post/2019/05/02/24476-keras-custom-objective-function-loss-function-in-keras.html 2019-05-02
When doing the kaggle project, I saw a person designing an unet and using a custom iou as the loss function. Only then did I realize that I could design the loss function myself ...In order to realize its own objective function, it naturally occurred to me to look at the definition of the objective function in Keras first, and check the source code found in/usr/local/lib/python3.5/dist-packages/Keras (my system is ubuntu16.

3 minutes to highlight Softmax

https://qaofficial.com/post/2019/05/02/24429-3-minutes-to-highlight-softmax.html 2019-05-02
Personal Website: Red Stone's Road to Machine LearningCSDN blog: red stone columnZhihu: Red StoneWeibo: RedstoneWill's WeiboGitHub: GitHub:RedstoneWillWechat Official Account: Aiyoudao (ID: Redstone Will) 1. what is Softmax Softmax is widely used in machine learning and deep learning.Especially when dealing with multi-classification (C > 2), the final output unit of the classifier needs Softmax function to carry out numerical processing.The definition of Softmax function is as follows:

Automatic Detection Technology of Pulmonary Nodules in CT Images Based on Depth Learning Three-Extraction of Effective Pulmonary Regions

https://qaofficial.com/post/2019/05/02/24361-automatic-detection-technology-of-pulmonary-nodules-in-ct-images-based-on-depth-learning-three-extraction-of-effective-pulmonary-regions.html 2019-05-02
development environment jupyter notebook/pycharm# 肺有效区域提取 import SimpleITK from scipy import ndimage as ndi from skimage.segmentation import clear_border from skimage.measure import label, regionprops from skimage.morphology import disk, dilation, binary_erosion, binary_closing from skimage.filters import roberts, sobel import cv2 def get_pixels_hu_by_simpleitk(dicom_dir): ''' 读取某文件夹内的所有dicom文件,并提取像素值(

CT image lung nodule automatic detection technology based on depth learning 4-data enhancement-defining neural network and training

https://qaofficial.com/post/2019/05/02/24360-ct-image-lung-nodule-automatic-detection-technology-based-on-depth-learning-4-data-enhancement-defining-neural-network-and-training.html 2019-05-02
Development Environment jupyter notebook# -- coding: utf-8 -- #训练图像分割网络(u-net)模型 import csv import glob import random import cv2 import numpy import os from typing import List, Tuple from keras.optimizers import SGD from keras.layers import Input, Convolution2D, MaxPooling2D, UpSampling2D, merge, BatchNormalization, SpatialDropout2D from keras.models import Model from keras import backend as K from keras.callbacks import