QA Official

pytorch (1) precautions for BN layer in pytorch 2019-04-24
When modifying a code recently, when using the network for reasoning, it was found that changing the batch size size of the test set each time would result in different reasoning results and even erroneous results. Later, it was found that BN layer was defined in the network. BN layer would transform the data in a Batch into positive distribution during the training process. During the reasoning process, the data were processed using the parameters in the training process.

selenium+chromedriver's Reverse Climbing Solution 2019-04-24
Problem Background: This problem is encountered in climbing a shopping mall on a certain evening. The original plan was to use Selenium+Chrome Driver+Mitm Proxy for happy brushing. However, after a few days, it was found that the brushing could not come out, and it would jump directly to the login interface (obviously, it was encountered with reverse climbing) To tell the truth, this is the first time that selenium has been used to climb backwards, so large-scale tests and comparisons have been made.

sorting algorithm 2019-04-24
Bubble Selection Insert Hill Fast Merge Heap SortReference ----------------------------------------------------Summary of Eight Sorting Algorithms and Selection of Basic Sorting Algorithms sort-also called bubble sort Sorting-The Most Important Sorting Algorithm Insert Sort-Simplest Sort Algorithm Sort-Inspiration from Tournament Sort Selection Sort-The simplest selection sort

BN Layer 2019-04-22
For a small white, there is a long way to go from understanding Batch Normalization (hereinafter referred to as BN) to using BN correctly.Make a record here. The most searched thing about BN on the Internet is the derivation of principles and the source of relevant papers. For example: But this does not help us in actual use, and it is not helpful to partners who need to use it quickly.

OpenCV Normalization of Image Illumination 2019-04-22
#include <cv.h> #include <highgui.h> #include <stdio.h> #include <string> using namespace std; void main() { int i; IplImage *pImageChannel[4] = {0,0,0,0}; int count = 15; char *name = new char; while(count<=17) { string FileName = "S010_001_015942"; itoa(count,name,10); FileName = FileName + name; FileName = FileName + string(".png"); IplImage *pSrcImage = cvLoadImage(FileName.c_str()); IplImage *pImage = cvCreateImage(cvGetSize(pSrcImage), pSrcImage->depth, pSrcImage->nChannels); if(pSrcImage) { for( i=0; i<pSrcImage->nChannels; i++) { pImageChannel[i] = cvCreateImage( cvGetSize(pSrcImage), pSrcImage->depth, 1); }//channel

Python File Rename Batch Processing 2019-04-22
import pdb import shutil import os import xml.etree.ElementTree as ET # python 3.2 dir = "/home/Desktop/workpy"; def rename( files ): tree = ET.parse(dir + "/zp/" + files) root = tree.getroot() #print(root) #os.mkdir (dirname1) name = root.find('filename').text #name = name[:-4] print (name) print('\n') print (dir) print('\n') print(dir + "/zp/" + files) print('\n') print(dir + "/zp_2/" + name + ".xml") print('\n') shutil.copyfile(dir + "/zp/" + files, dir + "/zp_2/" + name +

Python Image Batch Processing (Image Filtering Processing) 2019-04-22
# Su Haoran #[email protected] #2017.06.14 import arcpy,envipy envipy.Initialize(arcpy) from arcpy import env env.workspace="E:/aaa" rasters = arcpy.ListRasters("*", "JPG") for raster in rasters: inraster = raster outraster= "E:/bbb/lvbo_"+raster.strip(".jpg") arcpy.FilterWithConvolution_envi(inraster, outraster, "Sobel", 3, 0, 20, "") print("All have done")

Python cmd instruction to enter folder directory 2019-04-22
From: 以进入D盘文件夹,安装python第三方库pip为例: 第一种方法___单步进入 第一步:在cmd输入D: 第二步:输入dir #获得D盘文件目

Windows Executes python Programs Using bat Batch Processing 2019-04-22
Step 1: first write a simple python program, the code is as follows: print "call success." 执行结果: >>> ================================ RESTART ================================ >>> call success. >>> 步骤2:使用bat批处理程序执行python程序,“callpython.bat

ajax page sends post request 2019-04-22
ajax sends url request, then the background returns data, and the foreground processes according to the returned data ~ <script type="text/javascript" src="js/jquery-1.4.1.min.js"></script> <script type="text/javascript"> $().ready(function () { $('#Login').click(function () { $.ajax({ type: "POST", url: "login.action", data: "sysUser.loginName=" + escape($('#username').val()) + "&sysUser.password=" + escape($('#password').val()), beforeSend: function () { $("#login").css("display", "none"); }, success: function (msg) { if (msg == "success") { //parent.tb_remove(); parent.document.location.href = "mainPage.action"; //如果登录成