December 2018
Intermediate to advanced
268 pages
8h 23m
English
This is a fairly simple section made up of three primary steps—creating the loss.py file and placing two loss functions in it for us to inherit later on in the development.
Perform the following steps to create the loss.py file:
#!/usr/bin/env python3import tensorflow as tf

def self_regularization_loss(y_true,y_pred): return tf.multiply(0.0002,tf.reduce_sum(tf.abs(y_pred-y_true)))
In the preceding step, you're ...
Read now
Unlock full access