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