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.
But this does not help us in actual use, and it is not helpful to partners who need to use it quickly.
Step 1: first write a simple python program print.py, the code is as follows: print "call success." 执行结果： >>> ================================ RESTART ================================ >>> call success. >>> 步骤2：使用bat批处理程序执行python程序，“callpython.bat
normalize(src, dst, 255, 0, NORM_MINMAX);
NORM_MINMAX: Array values are shifted or scaled to a specified range. Linear normalization is commonly used.
NORM_INF: the definition of this type has not been found. according to the corresponding item of OpenCV 1, it may be the C- norm (the maximum absolute value) of the normalized array.
NORM_L1 : L1-norm of normalized array (sum of absolute values)
NORM_L2: the (euclidean) L2- norm of the normalized array
One, Simple Code code directly, it is still relatively simple to understand, os is simple, control power is relatively small, subprocess can obtain the corresponding cmd output, which is convenient for further analysis of operation results #import os #os.system("c:\\sam.bat") import subprocess cmd = 'cmd.exe c:\\sam.bat' p = subprocess.Popen("cmd.exe /c" + "c:\\sam.bat abc", stdout=subprocess.PIPE, stderr=subprocess.STDOUT) curline = p.stdout.readline() while(curline != b''): print(curline) curline = p.stdout.readline() p.wait() print(p.returncode) attach sam.bat file: echo