When working with pretrained deep learning models in TensorFlow the input tensor is often fixed and changing a tensor from the beginning of the graph is by design painful. In this post I want to show how to replace tensors…
Python
In this post I would like to show how to use a pre-trained state-of-the-art model for image classification for your custom data. For this we utilize transfer learning and the recent efficientnet model from Google. An example for the standford…
If you ever trained a CNN with keras on your GPU with a lot of images, you might have noticed that the performance is not as good as in tensorflow on comparable tasks. In this post I will show an…
After weeks of training and optimizing a neural net at some point it might be ready for production. Most deep learning projects never reach this point and for the rest it’s time to think about frameworks and technology stack. In…
There is a lot of confusion about return_state in Keras. What does ist actually return and how can we use it for stacking RNNs or encoder/decoder models. Hopefully this post makes it a bit clearer. Cell state vs Hidden state…
This post is about how to snapshot your model based on custom validation metrics. First we define the custom metric, as shown here. In this case we use the AUC score: import tensorflow as tf from sklearn.metrics import roc_auc_score def…
Keras offers some basic metrics to validate the test data set like accuracy, binary accuracy or categorical accuracy. However, sometimes other metrics are more feasable to evaluate your model. In this post I will show three different approaches to apply…