from model.py.
logits = tf.layers.dense(
z, num_classes, activation=None,
kernel_initializer=tf.random_normal_initializer(stddev=.01))
return tfd.Categorical(logits=logits)
def lerp(global_step, start_step, end_step, start_val, end_val):
```

```
"""Utility function to linearly interpolate two values."""
interp = (tf.cast(global_step - start_step, tf.float32)
/ tf.cast(end_step - start_step, tf.float32))
interp = tf.maximum(0.0, tf.minimum(1.0, interp))
return start_val * (1.0 - interp) + end_val * interp
```
#### **Listing 3.** Modifications to resnet\_model\_fn in resnet\_main.py.

```