Fine-tuning a Sparse Model - 2.5 English

Vitis AI Optimizer User Guide (UG1333)

Document ID
Release Date
2.5 English

Training a sparse model is no different from training a normal model. The model will maintain sparsity internally. There is no need for any additional actions other than adjusting the hyper-parameters.

sparse_model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"]), y_train, batch_size=128, epochs=15, validation_split=0.1)
sparse_model.save_weights("model_sparse_0.2", save_format="tf")
Note: When calling save_weights, use the "tf" format to save the weights.