MCPcopy Create free account
hub / github.com/deepdrive/deepdrive / linear

Function linear

tensorflow_agent/layers.py:33–38  ·  view source on GitHub ↗
(x, name, size)

Source from the content-addressed store, hash-verified

31
32
33def linear(x, name, size):
34 input_size = np.prod(list(map(int, x.get_shape()[1:])))
35 x = tf.reshape(x, [-1, input_size])
36 w = tf.get_variable(name + "_W", [input_size, size], initializer=tf.random_normal_initializer(0.0, 0.005))
37 b = tf.get_variable(name + "_b", [size], initializer=tf.zeros_initializer)
38 return tf.matmul(x, w) + b
39
40
41def max_pool_2x2(x):

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected