We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e373224 commit c35fc4cCopy full SHA for c35fc4c
tensorflow_model_optimization/python/core/sparsity/keras/pruning_callbacks.py
@@ -64,6 +64,8 @@ def __init__(self):
64
def on_train_begin(self, logs=None):
65
# Collect all the prunable layers in the model.
66
self.prunable_layers = _collect_prunable_layers(self.model)
67
+ if not self.prunable_layers:
68
+ return
69
# If the model is newly created/initialized, set the 'pruning_step' to 0.
70
# If the model is saved and then restored, do nothing.
71
if self.prunable_layers[0].pruning_step == -1:
0 commit comments