Deploying a new version of your model

The real power of Fritz exists in the automatic download of revised model files. Here, we will demonstrate this.

So far, we have uploaded our old (a+b)2 model and performed the inference. Now, we will update it to (a+b)3 and check whether our app automatically downloads the revised model.

For that, we need to create the (a+b)3 model. First, we need to recall our Creating and saving model section under Chapter 4TensorFlow Mobile in Android, where we created the (a+b)2 model. We are going to make a small change that will convert this model:

import tensorflow as tfa = tf.placeholder(tf.int32, name='a')  # inputb = tf.placeholder(tf.int32, name='b')  # inputtimes = tf.Variable(name="times", dtype=tf.int32, ...

Get Machine Learning for Mobile now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.