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

Method _dnn

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

Source from the content-addressed store, hash-verified

119 tf.summary.histogram('%s/activation' % tag, value)
120
121 def _dnn(self, dnn_input, dnn_hidden_units=None, layer_name=''):
122 for layer_id, num_hidden_units in enumerate(dnn_hidden_units):
123 with tf.variable_scope(layer_name + '_%d' % layer_id,
124 partitioner=self._dense_layer_partitioner,
125 reuse=tf.AUTO_REUSE) as dnn_layer_scope:
126 dnn_input = tf.layers.dense(
127 dnn_input,
128 units=num_hidden_units,
129 activation=tf.nn.relu,
130 name=dnn_layer_scope)
131 if self.use_bn:
132 dnn_input = tf.layers.batch_normalization(
133 dnn_input, training=self.is_training, trainable=True)
134 self._add_layer_summary(dnn_input, dnn_layer_scope.name)
135
136 return dnn_input
137
138 def _create_model(self):
139 # input features

Callers 1

_create_modelMethod · 0.95

Calls 2

_add_layer_summaryMethod · 0.95
variable_scopeMethod · 0.80

Tested by

no test coverage detected