I have both an Inceptionv4 and ResNet50 model that I trained and now I want to deploy it. I have successfully run a web app locally on my computer. Through great difficulty, I was able to get something that should be able to run on heroku but then I started getting memory problems. Heroku was saying the model uses too much memory.
I trained the Inceptionv4 and ResNet50 on 512x512 size images then trained the ResNet50 on 299x299 images (all trained with 16-bit precision) and had similar problems and the pth files and pkl files were similar sizes and still high memory usage (>1GB).
How can I resolve this?