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

Function print_layer_summary

tensorflow/python/keras/utils/layer_utils.py:170–185  ·  view source on GitHub ↗

Prints a summary for a single layer. Arguments: layer: target layer.

(layer)

Source from the content-addressed store, hash-verified

168 print_fn('=' * line_length)
169
170 def print_layer_summary(layer):
171 """Prints a summary for a single layer.
172
173 Arguments:
174 layer: target layer.
175 """
176 try:
177 output_shape = layer.output_shape
178 except AttributeError:
179 output_shape = 'multiple'
180 except RuntimeError: # output_shape unknown in Eager mode.
181 output_shape = '?'
182 name = layer.name
183 cls_name = layer.__class__.__name__
184 fields = [name + ' (' + cls_name + ')', output_shape, layer.count_params()]
185 print_row(fields, positions)
186
187 def print_layer_summary_with_connections(layer):
188 """Prints a summary for a single layer (including topological connections).

Callers 1

print_summaryFunction · 0.85

Calls 2

print_rowFunction · 0.85
count_paramsMethod · 0.80

Tested by

no test coverage detected