随笔分类 -  Tensorflow实战Google深度学习框架

摘要:1 import os 2 import tab 3 import tensorflow as tf 4 5 print "tensorflow 5.2 " 6 7 from tensorflow.examples.tutorials.mnist import input_data 8 9 ''' 10 mnist = input_data.read_... 阅读全文
posted @ 2018-11-09 14:05 苍洱 阅读(351) 评论(0) 推荐(0)
摘要:第五章中完整的训练MNIST数据的神经网络模型的程序代码中,直接运行程序的话会遇到以下的错误。 把下面的这行代码 tf.initialize_all_variables.run()AttributeError: 'function' object has no attribute 'run' 阅读全文
posted @ 2018-11-09 14:00 苍洱 阅读(150) 评论(0) 推荐(0)
摘要:import os import tab import tensorflow as tf from numpy.random import RandomState print "hello tensorflow 4.1" batch_size = 8 x = tf.placeholder(tf.float32,shape=(None,2),name='x-input') y_ = tf.p... 阅读全文
posted @ 2018-11-06 17:21 苍洱 阅读(246) 评论(0) 推荐(0)
摘要:和tensorflow的版本有关系 新版本 将tf.select替换为tf.where 阅读全文
posted @ 2018-11-06 14:52 苍洱 阅读(951) 评论(0) 推荐(0)
摘要:参考Tensorflow%20实战Google深度学习框架.pdf 阅读全文
posted @ 2018-11-05 18:05 苍洱 阅读(239) 评论(0) 推荐(0)
摘要:initialize_all_variables已被弃用,将在2017-03-02之后删除。 说明更新:使用tf.global_variables_initializer代替。 就把tf.initialize_all_variables()改为global_variables_initializer 阅读全文
posted @ 2018-11-02 14:32 苍洱 阅读(2138) 评论(0) 推荐(0)