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

Function bias_variable

3_Neural_Network/code/ops.py:19–29  ·  view source on GitHub ↗

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

(name, shape)

Source from the content-addressed store, hash-verified

17
18
19def bias_variable(name, shape):
20 """
21 Create a bias variable with appropriate initialization
22 :param name: bias variable name
23 :param shape: bias variable shape
24 :return: initialized bias variable
25 """
26 initial = tf.constant(0., shape=shape, dtype=tf.float32)
27 return tf.get_variable('b_' + name,
28 dtype=tf.float32,
29 initializer=initial)
30
31
32def fc_layer(x, num_units, name, use_relu=True):

Callers 1

fc_layerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected