• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






天生自然

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 ··· 251 252 253 254 255 256 257 258 259 ··· 276 下一页

2019年5月16日

吴裕雄 python 神经网络——TensorFlow训练神经网络:不使用正则化
摘要: import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data INPUT_NODE = 784 # 输入节点 OUTPUT_NODE = 10 # 输出节点 LAYER1_NODE = 500 # 隐藏层数 ... 阅读全文
posted @ 2019-05-16 14:24 吴裕雄 阅读(348) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow训练神经网络:全模型
摘要: import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data INPUT_NODE = 784 # 输入节点 OUTPUT_NODE = 10 # 输出节点 LAYER1_NODE = 500 # 隐藏层数 ... 阅读全文
posted @ 2019-05-16 14:07 吴裕雄 阅读(697) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow pb文件保存方法
摘要: import tensorflow as tf from tensorflow.python.framework import graph_util v1 = tf.Variable(tf.constant(1.0, shape=[1]), name = "v1") v2 = tf.Variable(tf.constant(2.0, shape=[1]), name = "v2") resul... 阅读全文
posted @ 2019-05-16 13:44 吴裕雄 阅读(357) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow variables_to_restore函数的使用样例
摘要: import tensorflow as tf v = tf.Variable(0, dtype=tf.float32, name="v") ema = tf.train.ExponentialMovingAverage(0.99) print(ema.variables_to_restore()) saver = tf.train.Saver({"v/ExponentialMovingAv... 阅读全文
posted @ 2019-05-16 13:41 吴裕雄 阅读(420) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow 滑动平均类的保存
摘要: import tensorflow as tf v = tf.Variable(0, dtype=tf.float32, name="v") for variables in tf.global_variables(): print(variables.name) ema = tf.train.ExponentialMovingAverage(0.99) maintain_... 阅读全文
posted @ 2019-05-16 13:38 吴裕雄 阅读(283) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow ckpt文件保存方法
摘要: import tensorflow as tf v1 = tf.Variable(tf.random_normal([1], stddev=1, seed=1)) v2 = tf.Variable(tf.random_normal([1], stddev=1, seed=1)) result = v1 + v2 init_op = tf.global_variables_initialize... 阅读全文
posted @ 2019-05-16 13:32 吴裕雄 阅读(667) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow 变量管理
摘要: import tensorflow as tf with tf.variable_scope("foo"): v = tf.get_variable("v", [1], initializer=tf.constant_initializer(1.0)) #with tf.variable_scope("foo"): # v = t... 阅读全文
posted @ 2019-05-16 13:22 吴裕雄 阅读(245) 评论(0) 推荐(0)
 
吴裕雄 PYTHON 神经网络——TENSORFLOW MNIST读取数据
摘要: from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("E:\\datasets\\MNIST_data\\", one_hot=True) print("Training data size: ", mnist.train.num_examples) pri... 阅读全文
posted @ 2019-05-16 11:43 吴裕雄 阅读(255) 评论(0) 推荐(0)
 
吴裕雄 PYTHON 神经网络——TENSORFLOW 滑动平均模型
摘要: import tensorflow as tf v1 = tf.Variable(0, dtype=tf.float32) step = tf.Variable(0, trainable=False) ema = tf.train.ExponentialMovingAverage(0.99, step) maintain_averages_op = ema.apply([v1]) with... 阅读全文
posted @ 2019-05-16 11:32 吴裕雄 阅读(346) 评论(0) 推荐(0)
 
吴裕雄 PYTHON 神经网络——TENSORFLOW 正则化
摘要: import tensorflow as tf import matplotlib.pyplot as plt import numpy as np data = [] label = [] np.random.seed(0) # 以原点为圆心,半径为1的圆把散点划分成红蓝两部分,并加入随机噪音。 for i in range(150): x1 = np.random.uniform... 阅读全文
posted @ 2019-05-16 11:26 吴裕雄 阅读(237) 评论(0) 推荐(0)
 
上一页 1 ··· 251 252 253 254 255 256 257 258 259 ··· 276 下一页