摘要: 一、即时执行模式 import tensorflow as tfimport tensorflow.contrib.eager as tfetfe.enable_eager_execution() a = tf.constant(12)counter = 0while not tf.equal(a, 阅读全文
posted @ 2018-09-01 22:10 python坚持者 阅读(2718) 评论(0) 推荐(0) 编辑
摘要: 一、tensorboard网络结构 import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_data #载入数据集mnist = input_data.read_data_sets("MNIST_dat 阅读全文
posted @ 2018-09-01 15:21 python坚持者 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 一、优化器 import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_data #载入数据集mnist = input_data.read_data_sets("MNIST_data",one_hot=T 阅读全文
posted @ 2018-09-01 13:08 python坚持者 阅读(436) 评论(0) 推荐(0) 编辑
摘要: tf.nn.sparse_softmax_cross_entropy_with_logits() #交叉熵计算代码 一、交叉熵 import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_data #载入数 阅读全文
posted @ 2018-09-01 13:04 python坚持者 阅读(864) 评论(0) 推荐(0) 编辑
摘要: 一、MNIST数据集分类简单版本 import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_data #载入数据集mnist = input_data.read_data_sets("MNIST_data 阅读全文
posted @ 2018-09-01 12:38 python坚持者 阅读(650) 评论(0) 推荐(0) 编辑