How To Print All Activation Shapes (more Detailed Than Summary()) For Tensorflow V2 Keras Model?
I've spent a lot of time with Tensorflow v.0 and v.1, and now I'm trying Tensorflow v.2 keras model. model.summary() looked easy and convenient, but lack details. Here's a toy exam
Solution 1:
The summary will not do this automatically, so you have to adapt. You can, for instance, create a recurrent summary:
deffull_summary(layer):
#check if this layer has layersifhasattr(layer, 'layers'):
print('summary for ' + layer.name)
layer.summary()
print('\n\n')
for l in layer.layers:
full_summary(l)
Use it as:
full_summary(my_model)
Post a Comment for "How To Print All Activation Shapes (more Detailed Than Summary()) For Tensorflow V2 Keras Model?"