Yaohong

为了真相不惜被羞辱

The form of our body in future

The form of our body in future 1.The human body consumes energy in the form of carbohydrate. 2.The human body consumes energy in the form of carbohydrate and electric, part of our body are machine. 3.The human body consumes energy in the form of nuclear in long long future, and we can calculate just like we are a super computer .

The Simple Implement of BatchNorm2D

The Simple Implement of BatchNorm2D The first is that instead of whiteningthe features in layer inputs and outputs jointly, we will normalize each scalar feature independently, by making ithave the mean of zero and the variance of 1. For a layer with d-dimensional inputx = (x(1). . . x(d)), we will nor-malize each dimension 1.MyBatchNorm2D import numpy as np; class MyBatchNorm2D: def __init__(self): pass def forward(self, x): x = np.array(x); mean = np.

model(x) vs model.forward(x)

model(x) vs model.forward(x) __call__ magic method in nn.Module will invoke forward() method and take care of hooks and states that python allows, so we should use model(x) rather than call model.forward(x) directly. REFERENCE: 1.Why there are different output between model.forward(input) and model(input) 2.Calling forward function without .forward() 3.torch.nn.module codes

How to extract knowledge?

How to extract knowledge? I held the opinion before that to do knowledge extraction can be done only by summarizing, but it is not a good way. In contrast, put the knowledge back to a concrete scenario will work for user understandings. I used to thought common truths are the most valuable of knowledge, but perhaps we need the knowledge with personal experiences. Because it contains the problem that the author face and the way how one to think, while summary knowledge is only the result of thinking.

How to face the investment risk?

How to face the investment risk? Investment risk is the expectation loss of our investment. It is difficult to calculate the probability of loss sometimes, but we can assume that the loss have happened, then try to find out the reason of loss. Before investing, we can try to answer the following two questions: 1.What cause the price of properties fall 50%? Liquidity risk Credit risk

DNN RNN CNN codes

Simple DNN RNN CNN example codes 1.DNN-Deep neural network import numpy as np; class myDNN: # 3 * 5 * 2 def __init__(self, input, hidden, output): # hidden random weight # Note: hidden_weight can be the shape of (input,hidden); correspondingly, `self.hidden_out` should equal `np.dot(input_data, self.hidden_weight)` to accord with hidden_weight shape. self.hidden_weight = np.random.rand(hidden, input); self.hidden_bias = np.random.rand(hidden); # hidden random weight self.output_weight = np.random.rand(output,hidden); self.output_bias = np.random.rand(output); # def forward(self, input_data): self.

Use Opencv stitching_detailed To Stitch Segmentation image

Use Opencv stitching_detailed To Stitch Segmentation image Environment: python version 3.7 opencv-python version 4.5.1.48 1.Download stitching_detailed file save it with file name stitching_detailed.py; 2.Run the command; $python.exe stitching_detailed.py image_1.png image_2.png image_3.png image_4.png image_5.png image_6.png image_7.png image_8.png image_9.png origin.png --features=brisk --matcher=affine Note that: image 1~9 is Segmentation images and origin.png is a full picture. REFERENCE: stitching_detailed stitching_detailed.py source codes is follow: """ Stitching sample (advanced) =========================== Show how to use Stitcher API from python.

How to categorize our money

How to categorize our invest money? I think sleep peacefully at in night is the most important thing when we do the investment. I don’t need to worry about that I can’t pay my next monthly rent for the apartment after investing. I believe that to avoid wake up at midnight is categorize our money. We can divide our cash into four categories. The first category is called daily cash, it used to pay our daily cost.

2021-04-14 Diary

2021-04-14 Diary While I was sitting on the chair searching on the internet, my little baby looked at me and was going to cry in the bedroom. I known he was tired and need to go to bed. So I close the Mac and going in the bedroom. When I clapped and open my hands to hold him, he laughed happily and came to me. I held him to the bed, but as soon as he sit on the bed, he started to cry and crawled slowly to the bedside cupboard.

Futures learning notes 001

Futures learning notes 001 Futures Futures are derivate financial contract that obligate the parties to transact an asset at a predetermined future date and price. The buyer must purchase or the seller must sell the underlying asset at the set price, regardless of the current market price at the expiration date. futures can exchange in Shanghai Futures Exchange Shanghai Futures Exchange can exchange follow futures: Copper, Copper(BC), Lead, Zinc, Aluminium, Nickel, Tin

从个人角度的行业划分

从个人角度的行业划分 衣食住行 衣(必):服装、个护 食(必):农业、餐饮、 住(必):房产、家电(+联网+智能)、 行:车、物流、公共交通 医师作息 医

Acceptance in meditation

Acceptance in meditation “Bring your attention to your head and face, noticing all sensations and feeling here. And just trying to accept all the feelings and sensations, rather than trying to judge them or change them in any way.” This pratice works for me and alleviates my tension headache significantly.

Tension headache

Tension headache Symptoms Signs and symptoms of a tension headache include: Dull, aching head pain Sensation of tightness or pressure across your forehead or on the sides and back of your head Tenderness on your scalp, neck and shoulder muscles Tension headaches are divided into two main categories — episodic and chronic. Episodic tension headaches Episodic tension headaches can last from 30 minutes to a week. Frequent episodic tension headaches occur less than 15 days a month for at least three months.

高等数学主要内容

高等数学主要内容 一、空间解析几何与向量代数 空间直角坐标系 向量的概念及其线性; 向量坐标、向量的数量积; 平面方程、直线方程; 曲面方程、曲线方程;

高等数学主要内容

高等数学主要内容 一、空间解析几何与向量代数 空间直角坐标系 向量的概念及其线性; 向量坐标、向量的数量积; 平面方程、直线方程; 曲面方程、曲线方程;

Laravel配置阿里云企业邮箱

Laravel配置阿里云企业邮箱 企业邮箱POP、SMTP、IMAP地址列表如下: (阿里云邮箱web端通用访问地址:https://qiye.

How to persuade people using motivational interviewing?

Advise people.

How to persuade people using motivational interviewing? Imaging a person that you want to advise him/her to do or not to do something. I image I was advising my wife to sleep earlier, because she take care our baby at home and often sleep too late. 1. Ask her an open question about the behaviour? For example, “Why you do that? I would like to hear how to you think that sincerely?

The past five days

The past five days I have been working every day for the past five days. My plan is: day1: set up the development enviroment and finish login page; # interface1: login [done] day2: finish home page layout and choose a image from backend; # interface7: getImages; [part done] day3: load a image and texts; # interface8: getTextList; [done] day4: drag text by mouse, assign the text size and color; [part done] day5: finish font style plug in, load the setting text style; day6: interface: save style interface; The reality is:

Why do I see it a burden

Why do I see it a burden? 1.The whole story My friend asked me for a help recently. If I promise him, it would take me at least a week to finish the task which I can spend to improve my skill and prepare for the examination on April. The task is to build a website to collect data which is important for him because he needs the data for research.

How does warp Perspective work?

How does warp Perspective work? 1.warp perspective with cv2 if __name__ == "__main__": # coordinate: (y,x), left_top, right_rop, left_bottom, right_bottom src = np.float32([[20.0, 0.0], [20.0 ,315.0], [186.0, 17.2], [181.0, 299.0]]) dst = np.float32([[0.0, 0.0], [0.0, 315.0], [202.0, 7.0], [200.0, 306.0]]) # load image warp_img = cv2.imread("./my_wide_angle_orig.jpg") warp_img = cv2.cvtColor(warp_img, cv2.COLOR_BGR2RGB) print("warp_img: ",warp_img.shape) # (638, 958, 3) width = int(warp_img.shape[1]/3) height = int(warp_img.shape[0]/3) warp_img = cv2.resize(warp_img, (width,height), interpolation=cv2.INTER_LINEAR) print("warp_img.shape:",warp_img.shape) # (212, 319, 3) ## orig image plt.