(self, dnn_input, dnn_hidden_units=None, layer_name='')
| 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): |
no test coverage detected