Yaohong

为了真相不惜被羞辱

简单的图像加宽和截取类

支持图像加宽高,或截掉宽高

简单的图像加宽和截取类 源码如下: class ImageUtils: def __init__(self): import numpy; self.np = numpy; pass ## def resizePadding(self, np_2d_image, target_width,target_height): single_img = np_2d_image; tmp_img_width = single_img.shape[1] tmp_img_height = single_img.shape[0] np = self.np print("resizeFile origin shape :",single_img.shape) # 宽度pading添加 if tmp_img_width < target_width: for x in range(tmp_img_width, target_width): # tmp_arr =

如何计算一个卷积层的参数?

卷积层参数=(卷积长x卷积宽x卷积通道数+1)x卷积深度

如何计算一个卷积参数? 在计算卷积参数前,我们先来看几个小问题。 1.怎么判断一个卷积核有多少通道? 一个卷积核的通道数=前一层的通道数; 比如前一

如何计算全连接神经元参数

当前层的全连接参数=上一层神经元数x当前神经元数+当前神经偏移值数量

如何计算全连接神经元参数? 模型源码为: from tensorflow.keras import models from tensorflow.keras import layers network = models.Sequential() network.add(layers.Dense(504, activation='relu', input_shape=(504,))) network.add(layers.Dense(11, activation='softmax')) network.summary() 输出: Model: "sequential" _________________________________________________________________ Layer (type) Output Shape Param # ================================================================= dense (Dense) (None, 504) 254520 _________________________________________________________________ dense_1 (Dense) (None, 11) 5555 ================================================================= Total params: 260,075 Trainable params: 260,075 Non-trainable params: 0

Tensorflow 保存和加载model

Tensorflow 保存和加载model 保存model的代码: import tensorflow as tf save_model_path = "/save_model" # 保存的文件夹路径 network.save(save_model_path); 保存的目录格式如下,期中saved_model.pb是主要的文

一条微信消息在网络层的历程

简单理解网络模型

一条微信消息在网络层的历程 当我们向朋友发送一条微信文字消息时,我们的操作仅仅是让手机连上网,通过连接WIFI或使用移动网络,然后在手机上打字

PHP autoload

更新中...

php autoload In general, when we use a file which not include in current file, we need to load it in current file by using require or include; But when a project has a lot of php files, it is not a good way to include each file manually. Let’s see a simple code: <?php $person = new Person("Rhys", 20); var_dump($person); There is a new class Person which didn’t be

JAVA 序列化

JAVA 序列化 Java编译过程 Java源码-> javac将源码转换成class 文件->java命令执行 class 文件; 方法中的“T”用途是什么

Some notes on Convolution Course

Some notes on Convolution course What is padding? Padding is to add some pixels to the border of the original image, such as a 6*6 image will become a 8*8 image if we add a pixel to its border. valid convolution vs same convolution. Valid convolution is on padding that means the actual pixels of the output image after we convole original image with filter. Same convolution means adding padding so that the output image has the same size as its input image.

My Little Baby

My Little Baby My wife and I went to hostipal because she felt pain in womb on 6 May. The doctor advised hostipalization for her. She felt pain more frequenctly at that night. Doctors gave her a anesthetic that make her felt less pain. She was ready to give birth a baby on the next day morning. I was waiting beside the door of delivery room. After two hours, a nurse opened the door and told me that my wife had given birth to a baby successfully.

广东家常菜做法记录

原味、好吃

广东家常菜 豆豉排骨 食材: 排骨一根(约350g) 豆豉(5克 约覆盖的碗底) 香菇(10g 约覆盖的碗底) 土豆(80g) 酱油(5ml) 盐(3克) 水(1

深度学习-第一个数字识别项目

深度学习的步骤过程

深度学习-第一个数字识别项目 今天按Google官方推荐流程,整理了开发模板,不是所有深度学习都严格按这个模板来实现,不同项目步骤有所删减,但

深度学习的历史(一)

更新中...

深度学习的历史(一) 深度学习的主要突破是从2011年开始,开始超越其它算法成为主流也是从这个时间开始,因此我们有必要先了解从2011年开始的

英语发音-连读和节奏

连读那些事...

Echo set color

Echo set color 先看例子:echo -e "\033[32m Hello world \033[0m"; 会输出 $echo -e "\033[32m Hello world \033[0m" Hello world # 绿色的文字 其中: -e表示解析逃逸字符(Escape character),逃逸字符为

How to use CleanWhite Hugo Theme?

How to use CleanWhite Hugo Theme? CleanWhite Hugo Theme 是Huabing Zhao制作的hugo主题,非常高雅好用,再次感谢Huabing。 我在使用时,花了一点时间,主要遇到以下问

The ways to overcome overfitting Collect data -> Data Processing -> Build model -> Training Augmentaion L1,L2 Regularization early stopping Regularization Dropout Reduce Parameters

fit x shape and y shape # OS:Windows 10 # python version: 3.7.4 # numpy version:1.19.4 # tensorflow version:1.14.0 # keras version:2.1.5 Error ValueError: Error when checking target: expected dense_2 to have 4 dimensions, but got array with shape (145, 11) def simpleCNN(input_shape): model = Sequential() model.add(Conv2D(filters=256, kernel_size = (3*3), activation="relu", input_shape=input_shape, padding="same" ) );# output: 13*13*384 model.add(BatchNormalization()) model.add(MaxPooling2D(pool_size=(3, 3), strides=(2,2), padding="same")); model.add(Dense(512, activation='relu', )) model.add(Dense(11, activation='softmax')) # model.add(layers.Dense(11, activation='sigmoid')) model.

How to input mathematics formula in markdown? 1.Edit a formula in latex.codecogs.com and download svg suffix file, then store it in you markdown project and refer it with url ![sum_y_substract_ypre](/img/math_formula/sum_y_substract_ypre.svg)

Terms in machine learning

Terms in machine learning FLOPS FLOPS=Floating point operation per seconds FLOPs=Floating point operations REFERNECD: what-is-flops-in-field-of-deep-learning