MCPcopy Create free account
hub / github.com/chinawithfrank/ChatBotCourse / weight_variable

Function weight_variable

digital_recognition_cnn.py:17–20  ·  view source on GitHub ↗
(shape)

Source from the content-addressed store, hash-verified

15
16# 初始化生成随机的权重(变量),避免神经元输出恒为0
17def weight_variable(shape):
18 # 以正态分布生成随机值
19 initial = tf.truncated_normal(shape, stddev=0.1)
20 return tf.Variable(initial)
21
22# 初始化生成随机的偏置项(常量),避免神经元输出恒为0
23def bias_variable(shape):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected