QA Official

Netty Game Server Actual Combat Development (2): Bytebuf-Container of Byte Data 2019-04-03
buffer The basic unit of network data is always byte.Java NIO provides ByteBuffer as byte container, but its function is too limited and has not been optimized.Using ByteBuffer is usually a tedious and complicated matter. Fortunately, Netty provides a powerful buffer implementation class to represent byte sequences and to help you manipulate bytes and custom POJO.This new buffer class, ByteBuf, is as efficient as JDK's ByteBuffer.ByteBuf was designed to

Netty Getting Started Tutorial (2)-Netty Server and Client 2019-04-03
Netty version in the code is 3.x because it is a preliminary study of Netty and Netty3 is easier to understand from the information found on the internet. 1. Netty Server import; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.jboss.netty.bootstrap.ServerBootstrap; import; import; import; import; import org.jboss.netty.handler.codec.string.StringDecoder; import org.jboss.netty.handler.codec.string.StringEncoder; /** * netty服务端入门 * */ public class Server { public

Netty from Zero to One-Getting Started 2019-04-03
Start This chapter explains the core components of Netty in turn and includes simple examples to get you started quickly.At the end of this chapter, you can write the client and server that depend on Netty. preparation If you want to run the examples in this chapter, you need at least the latest version of Netty and JDK above 1.6.Please download the latest Netty to, and JDK please download

Python Third Party Library-MatPlotlib Library 2019-04-03
import matplotlib.pyplot as plt pyplot module plt.ion (): Opens Interactive Mode plt.figure(num=None, figsize=None, dpi=None, facecolor=None, edgecolor=None, frameon=True, FigureClass=<class 'matplotlib.figure.Figure'>, **kwargs) Parameters: Num: integer or string, the default value is None.Id of the figure object.If num is not specified, a new figure will be created, and the id (that is, the number) will be incremented. This id exists in the member variable NUMBER of the figure object.If a num value is

Pytorch-based Feature Map Extraction 2019-04-03
brief introduction In order to understand the operation process of convolutional neural network conveniently, it is necessary to visually display the operation results of convolutional neural network. can be roughly divided into the following steps: Extraction of Single Picture Neural Network Construction Feature Map Extraction Visual Display Extraction of Single Picture According to the requirements of the target, convolution operation is required for a single picture, but the data read

Several Common Sorting Algorithms 2019-04-03
1, bubble sort Non-recursive Implementation void bubbleSort(int *array,int len) { int tmp; bool flag; for (int i= len-1; i > 0;i--) { flag = false; for (int j = 0; j < i;j++) { if (array[j] > array[j+1]) { flag = true; tmp = array[j]; array[j] = array[j+1]; array[j+1] = tmp; } } if (flag == false) { break; } } } Recursive Implementation void bubbleSort(int *array,int len) { if

Understanding of BN Layer 2019-04-03
1, BN layer why can prevent gradient disappear Batchnorm is one of the most important achievements proposed since the development of in-depth learning. it has been widely applied to major networks at present and has the effects of accelerating the convergence speed of networks and improving the stability of training. Batchnorm is essentially to solve the gradient problem in the process of back propagation.The full name of batchnorm is batch normalization, short for BN, i.

[vgg16]vgg16 related documents 2019-04-03
solver.prototxt net: "models/vgg16/train_val.prototxt" test_iter: 1000 test_interval: 2500 base_lr: 0.001 lr_policy: "step" gamma: 0.1 stepsize: 50000 display: 20 max_iter: 200000 momentum: 0.9 weight_decay: 0.0005 snapshot: 10000 snapshot_prefix: "models/vgg16/caffe_vgg16_train" solver_mode: GPU train.prototxt name: "VGG_ILSVRC_16_layer" layer { name: "data" type: "Data" top: "data" top: "label" include { phase: TRAIN } transform_param { mirror: true crop_size: 224 mean_file: "

addition of pytorch BN 2019-04-03
pytorch add BN layer Batch Standardization model training is not easy, especially for some very complex models, which cannot get convergence results very well. Therefore, adding some preprocessing to the data and using batch standardization at the same time can get very good convergence results, which is also an important reason why convolution networks can be trained to very deep layers. Data preprocessing At present, the most common methods of

remember thoroughly the function and usage of lower_bound and upper_bound 2019-04-03
When I used these two functions before, I read a few other people's blogs and remembered the general idea. I mixed them up once every time I used them, which was quite uncomfortable. Today, comparing the source codes of these two functions with my own attempts, I found that these two functions can only be used in " ascending order" sequence. Why put quotation marks?Because the comparison rules can be