How to put weights from a csv file into a model

I want to compare the recognition rate before and after quantization.

First, i want to save the weights of the trained model as a csv file,
quantize them through an external program, and then input the csv file
as the weights of the model again

but, i don’t know how…

thx for reading my Question.

1 Like

tf.keras.Model has explicit methods get_weights and load_weights with which you can store weights in any type of file and load them from any type of file.

Please take a look at this stackoverflow answer

3 Likes

I appreciate your reply.
I was able to solve this problem.

Thank you very much. ashutosh.

2 Likes