TensorFlow(三)可视化
来源:互联网 发布:linux安装hadoop2.7 编辑:程序博客网 时间:2024/05/29 12:16
import tensorflow as tfdef add_layer(inputs,in_size,out_size,activation_function=None): with tf.name_scope('layer'): with tf.name_scope('Weights'): Weights=tf.Variable(tf.random_normal([in_size,out_size]),name='w') with tf.name_scope('biases'): biases=tf.Variable(tf.zeros([1,out_size])+0.1) with tf.name_scope('Wx_plus_b'): Wx_plus_b=tf.matmul(inputs,Weights)+biases if activation_function is None: outputs = Wx_plus_b else: outputs = activation_function(Wx_plus_b) return outputswith tf.name_scope('inputs'): xs=tf.placeholder(tf.float32,[None,1],name='x_input') ys=tf.placeholder(tf.float32,[None,1],name='y_input') l1=add_layer(xs,1,10,activation_function=tf.nn.relu)prediction=add_layer(l1,10,1,activation_function=None)with tf.name_scope('loss'): loss=tf.reduce_mean(tf.reduce_sum(tf.square(ys-prediction),reduction_indices=[1])) with tf.name_scope('train'): train_step=tf.train.GradientDescentOptimizer(0.1).minimize(loss)sess=tf.Session()writer = tf.summary.FileWriter("logs/", sess.graph)sess.run(tf.initialize_all_tables())
阅读全文
0 0
- TensorFlow(三)可视化
- TensorFlow(二)可视化
- Tensorflow: 可视化
- TensorFlow 可视化
- tensorflow学习笔记三——可视化tensorboard
- Tensorflow实战学习(三)【数据流图定义、执行、可视化】
- TensorFlow学习(八):tensorborad可视化
- tensorflow tutorials(九):卷积神经网络可视化
- Tensorflow学习:Tensorboard可视化(二)
- TensorFlow基础知识6-可视化(TensorBoard)
- tensorflow学习笔记(七):tensorboard可视化
- Tensorflow(三)- CNN_MNIST
- 数据可视化漫谈(三)
- Tensorflow 可视化 TensorBoard 尝试~
- TensorBoard--TensorFlow可视化
- tensorflow可视化--tensorboard
- tensorflow数据可视化
- tensorflow可视化模块 tensorboard
- java中方法详解
- JavaScript基础之选择器
- Android中apk多渠道打包----友盟打包实现步骤
- JavaScript实现回到顶部/底部的两种方法
- opencv 人脸检测源码解析
- TensorFlow(三)可视化
- leetcode
- C++面试题(~10)
- java工程师必修之路
- eleasticsearch 安装配置
- gitlab使用说明 与Tortoise Git一起使用
- git 常用命令
- ababoost算法与原理
- 代写实习报告写作要求