MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / dnn

Method dnn

modelzoo/features/embedding_variable/deepfm/train.py:155–169  ·  view source on GitHub ↗
(self, dnn_input, dnn_hidden_units=None, layer_name='')

Source from the content-addressed store, hash-verified

153 tf.summary.scalar('eval_auc', self.auc)
154
155 def dnn(self, dnn_input, dnn_hidden_units=None, layer_name=''):
156 for layer_id, num_hidden_units in enumerate(dnn_hidden_units):
157 with tf.variable_scope(layer_name + "_%d" % layer_id,
158 partitioner=self.dense_layer_partitioner,
159 reuse=tf.AUTO_REUSE) as dnn_layer_scope:
160 dnn_input = tf.layers.dense(dnn_input,
161 units=num_hidden_units,
162 activation=tf.nn.relu,
163 name=dnn_layer_scope)
164 if self.use_bn:
165 dnn_input = tf.layers.batch_normalization(
166 dnn_input, training=self._is_training, trainable=True)
167 add_layer_summary(dnn_input, dnn_layer_scope.name)
168
169 return dnn_input
170
171 def prediction(self):
172 # input features

Callers 1

predictionMethod · 0.95

Calls 2

variable_scopeMethod · 0.80
add_layer_summaryFunction · 0.70

Tested by

no test coverage detected