MCPcopy Create free account
hub / github.com/easy-tensorflow/easy-tensorflow / weight_variable

Function weight_variable

3_Neural_Network/code/ops.py:5–16  ·  view source on GitHub ↗

Create a weight variable with appropriate initialization :param name: weight name :param shape: weight shape :return: initialized weight variable

(name, shape)

Source from the content-addressed store, hash-verified

3
4# weight and bais wrappers
5def weight_variable(name, shape):
6 """
7 Create a weight variable with appropriate initialization
8 :param name: weight name
9 :param shape: weight shape
10 :return: initialized weight variable
11 """
12 initer = tf.truncated_normal_initializer(stddev=0.01)
13 return tf.get_variable('W_' + name,
14 dtype=tf.float32,
15 shape=shape,
16 initializer=initer)
17
18
19def bias_variable(name, shape):

Callers 1

fc_layerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected