莫烦大大TensorFlow学习笔记(4)----分类问题

1、分类的loss损失函数:可设为交叉熵

cross_entropy = tf.reduce_mean( -tf.reduce_sum ( ys * tf.log ( prediction) ,
                                                reduction_indices = [1] ))

猜你喜欢

转载自www.cnblogs.com/Lee-yl/p/9416056.html