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

Method _set_output_names

tensorflow/python/keras/engine/network.py:354–371  ·  view source on GitHub ↗

Assigns unique names to the Network's outputs. Output layers with multiple output tensors would otherwise lead to duplicate names in self.output_names.

(self)

Source from the content-addressed store, hash-verified

352 self._feed_inputs.append(layer.input)
353
354 def _set_output_names(self):
355 """Assigns unique names to the Network's outputs.
356
357 Output layers with multiple output tensors would otherwise lead to duplicate
358 names in self.output_names.
359 """
360 uniquified = []
361 output_names = set()
362 prefix_count = {}
363 for layer in self._output_layers:
364 proposal = layer.name
365 while proposal in output_names:
366 existing_count = prefix_count.get(layer.name, 1)
367 proposal = '{}_{}'.format(layer.name, existing_count)
368 prefix_count[layer.name] = existing_count + 1
369 output_names.add(proposal)
370 uniquified.append(proposal)
371 self.output_names = uniquified
372
373 @trackable.no_automatic_dependency_tracking
374 def _init_subclassed_network(self, name=None, **kwargs):

Callers 1

_init_graph_networkMethod · 0.95

Calls 4

getMethod · 0.45
formatMethod · 0.45
addMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected