Creating the lambda function Publish the image to AWS ECR Last time we used “Author from scratch” to create a lambda function on AWS. This time we use the option “Container image” for this. Here we need to provide the “Amazon ECR image URI”, which is a place where we can publish images. ECR meansContinue reading “ML Zoomcamp 2023 – Serverless – Part 6”
Category Archives: ML-Zoomcamp
ML Zoomcamp 2023 – Serverless – Part 5
Preparing a Docker image In this part we want to package everything into a docker container. We use an AWS base image for our Dockerfile. You can find the public images from aws here (public.ecr.aws –> gallery.ecr.aws). In the gallery you can search for “python lambda” and we can find “python by AWS Lambda”. ThenContinue reading “ML Zoomcamp 2023 – Serverless – Part 5”
ML Zoomcamp 2023 – Serverless – Part 4
Preparing the Code for Lambda In the last parts we used Jupyter notebooks. Now we need Python scripts for the next steps, so we need to convert our existing code from Jupyter notebook to normal Python scripts. The tool we want to use is called nbconvert. Just use this command: We need to clean theContinue reading “ML Zoomcamp 2023 – Serverless – Part 4”
ML Zoomcamp 2023 – Serverless – Part 3
This is the second part of TensorFlow Lite section. The last article has covered the topics of converting the Keras model to TensorFlow Lite model and using it. In this article we are really removing TensorFlows dependency and excluding it completely. TensorFlow Lite – Part 2/2 Removing TensorFlow dependency When we only want to useContinue reading “ML Zoomcamp 2023 – Serverless – Part 3”
ML Zoomcamp 2023 – Serverless – Part 2
This section is about TensorFlow Lite and divided into two parts. In the first part (this article) there are information about TensorFlow Lite. So what is this library especially in contrast to TensorFlow. We’ll look again at the heavy-weight way using the big package of TensorFlow and then we’ll try to exclude TensorFlow step byContinue reading “ML Zoomcamp 2023 – Serverless – Part 2”
ML Zoomcamp 2023 – Serverless – Part 1
In this chapter, we will focus on how to take the trained model and deploy it. There are different ways to deploy a model, and one option is to deploy it using AWS Lambda. Introduction to serverless and AWS Lambda AWS Lambda enables the deployment of various applications, including machine learning models. The process involvesContinue reading “ML Zoomcamp 2023 – Serverless – Part 1”
ML Zoomcamp 2023 – Deep Learning – Part 14
Using the model In the last section we trained the final model – model on bigger images and saved the best one which we want to use now to test it on test dataset and make predictions. In this article we will cover: Loading the model Evaluating the model The evaluation is done quite easilyContinue reading “ML Zoomcamp 2023 – Deep Learning – Part 14”
ML Zoomcamp 2023 – Deep Learning – Part 13
Training a larger model In the sections before we use images of size 150×150 because the model can be trained faster (here:4 times faster). This is a good way when experimenting with parameters. Now we want to train on bigger images – let’s use images of size 299×299. Therefor we reuse the previous code forContinue reading “ML Zoomcamp 2023 – Deep Learning – Part 13”
ML Zoomcamp 2023 – Deep Learning – Part 12
Data Augmentation In the last section we talked about how to stabilize the network performance while we use dropout. This way we focus on overall shape instead of focussing on details like logos. It works because in each epoch another part of the network (not of the image) is hided/frozen. So small details like logosContinue reading “ML Zoomcamp 2023 – Deep Learning – Part 12”
ML Zoomcamp 2023 – Deep Learning – Part 11
Regularization and Dropout When training a model for 10 epochs, then the model will see the same image 10 times. If there is a special sign like a logo, the model recognize it and tend to declare everything as t-shirt that has that logo. That means the model could make many mistakes in classification inContinue reading “ML Zoomcamp 2023 – Deep Learning – Part 11”