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

Method _create_dense_layer

modelzoo/esmm/train.py:161–169  ·  view source on GitHub ↗
(self, input, num_hidden_units, activation, layer_name)

Source from the content-addressed store, hash-verified

159 tf.summary.scalar('eval_auc', self.auc)
160
161 def _create_dense_layer(self, input, num_hidden_units, activation, layer_name):
162 with tf.variable_scope(layer_name, reuse=tf.AUTO_REUSE) as mlp_layer_scope:
163 dense_layer = tf.layers.dense(input,
164 units=num_hidden_units,
165 activation=activation,
166 kernel_regularizer=self._l2_regularization,
167 name=mlp_layer_scope)
168 self._add_layer_summary(dense_layer, mlp_layer_scope.name)
169 return dense_layer
170
171 def _l2_regularizer(self, scale, scope=None):
172 if isinstance(scale, numbers.Integral):

Callers 3

_create_modelMethod · 0.95
_build_cvr_modelMethod · 0.95
_build_ctr_modelMethod · 0.95

Calls 2

_add_layer_summaryMethod · 0.95
variable_scopeMethod · 0.80

Tested by

no test coverage detected