Skip to content

Instantly share code, notes, and snippets.

@AkiyonKS
Created August 9, 2022 05:10
Show Gist options
  • Save AkiyonKS/0c3640d4e1b8012d9265944759e0739b to your computer and use it in GitHub Desktop.
Save AkiyonKS/0c3640d4e1b8012d9265944759e0739b to your computer and use it in GitHub Desktop.
logdir = tempfile.mkdtemp()
callbacks = [
tfmot.sparsity.keras.UpdatePruningStep(),
tfmot.sparsity.keras.PruningSummaries(log_dir=logdir),
]
model_for_pruning.fit(x = gen,
batch_size=batch_size, epochs=epochs, validation_data=(X_test, y_test),
callbacks=callbacks)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment