Skip to content

Instantly share code, notes, and snippets.

@sayakpaul
Created June 21, 2020 15:49
Show Gist options
  • Save sayakpaul/621e32438e7407fec1e67f831d0a164d to your computer and use it in GitHub Desktop.
Save sayakpaul/621e32438e7407fec1e67f831d0a164d to your computer and use it in GitHub Desktop.
pruning_schedule = tfmot.sparsity.keras.ConstantSparsity(
target_sparsity=target_sparsity,
begin_step=begin_step,
end_step=end_step,
frequency=frequency
)
pruned_model = tfmot.sparsity.keras.prune_low_magnitude(
trained_model, pruning_schedule=pruning_schedule
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment