Reducing the size of a TensorFlow model file

I have an TensorFlow model which basically classifies stuff into X-rays and Not X-rays.

My problem is that the TensorFlow model file(for that model) is a whopping 123mb big, and I need to reduce the size of it somehow.

I saw an answer on Stack Overflow which had the exact code for what I needed to do, but only in TensorFlow 1.0.

So if anyone here could give me the updated TensorFlow 2.0 code, I would appreciate it a lot.

Python Version : Python 3.8.7 TensorFlow on my Laptop: TensorFlow 2.4 TensorFlow on the server I am hosting the app on : TensorFlow-CPU 2.2.0

submitted by /u/banana_who_can_type
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *