The architecture of the deep learning model
In this section, we will continue the top-to-bottom, user-oriented approach. This drill-down method takes us from the top layer of a program down to the bottom layer. It is essential to learn how to perceive an application from different perspectives.
We will go from the user's point of view back to the beginning of the process in the following order:
- Invoking WIT
- The custom prediction function for WIT
We will first see how the visualization tool is launched.
Invoking WIT
You can choose the number of data points and the tool's height in the form just above WIT as shown in the following screenshot:
Figure 9.22: WIT parameters
The form is driven by the following code:
# Decode an image from tf.example bytestring
def decode_image(ex):
im_bytes = ex.features.feature['image/encoded'].bytes_list.value[0]
im = Image.open(BytesIO(im_bytes))
return im
We already...