4.4. Define the loss function, optimizer, accuracy, and predicted class¶
In [15]:
# Define the loss function, optimizer, and accuracyloss=tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(labels=target,logits=predictions))# Create a summary to monitor the cost functiontf.summary.scalar("Loss_function",loss)