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

Method _dnn

modelzoo/ple/train.py:177–192  ·  view source on GitHub ↗
(self, dnn_input, dnn_hidden_units=None, layer_name='')

Source from the content-addressed store, hash-verified

175 return tf.variable_scope(name, partitioner=part, reuse=tf.AUTO_REUSE)
176
177 def _dnn(self, dnn_input, dnn_hidden_units=None, layer_name=''):
178 for layer_id, num_hidden_units in enumerate(dnn_hidden_units):
179 with tf.variable_scope(layer_name + '_%d' % layer_id,
180 partitioner=self._dense_layer_partitioner,
181 reuse=tf.AUTO_REUSE) as dnn_layer_scope:
182 dnn_input = tf.layers.dense(
183 dnn_input,
184 units=num_hidden_units,
185 activation=self._dnn_activation,
186 name=dnn_layer_scope)
187 if self.use_bn:
188 dnn_input = tf.layers.batch_normalization(
189 dnn_input, training=self.is_training, trainable=True)
190 self._add_layer_summary(dnn_input, dnn_layer_scope.name)
191
192 return dnn_input
193
194 # single Extraction Layer
195 def cgc_model(self, inputs, level_name, is_last=False):

Callers 2

cgc_modelMethod · 0.95
_create_modelMethod · 0.95

Calls 2

_add_layer_summaryMethod · 0.95
variable_scopeMethod · 0.80

Tested by

no test coverage detected