MCPcopy Create free account
hub / github.com/SystemErrorWang/White-box-Cartoonization / fc_layer

Method fc_layer

train_code/loss.py:84–99  ·  view source on GitHub ↗
(self, bottom, name)

Source from the content-addressed store, hash-verified

82
83
84 def fc_layer(self, bottom, name):
85 with tf.variable_scope(name):
86 shape = bottom.get_shape().as_list()
87 dim = 1
88 for d in shape[1:]:
89 dim *= d
90 x = tf.reshape(bottom, [-1, dim])
91
92 weights = self.get_fc_weight(name)
93 biases = self.get_bias(name)
94
95 # Fully connected layer. Note that the '+' operation automatically
96 # broadcasts the biases.
97 fc = tf.nn.bias_add(tf.matmul(x, weights), biases)
98
99 return fc
100
101 def get_conv_filter(self, name):
102 return tf.constant(self.data_dict[name][0], name="filter")

Callers

nothing calls this directly

Calls 2

get_fc_weightMethod · 0.95
get_biasMethod · 0.95

Tested by

no test coverage detected