TF随笔-12
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 1 08:14:30 2017
@author: myhaspl@myhaspl.com
"""
from tensorflow.examples.tutorials.mnist import input_data
mnist=input_data.read_data_sets("mnist_datat/",one_hot=True)
print "训练数据大小:",mnist.train.num_examples
print "验证数据大小:",mnist.validation.num_examples
print "测试数据大小:",mnist.test.num_examples
print "训练数据:",mnist.train.images[0]
print "训练数据:",mnist.train.labels[0]
print "训练数据:",mnist.train.images[1]
print "训练数据:",mnist.train.labels[1]
TF随笔-12的更多相关文章
- TF随笔-4
>>> import tensorflow as tf>>> a=tf.constant([[1,2],[3,4]])>>> b=tf.const ...
- TF随笔-13
import tensorflow as tf a=tf.constant(5) b=tf.constant(3) res1=tf.divide(a,b) res2=tf.div(a,b) with ...
- TF随笔-11
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import tensorflow as tf my_var=tf.Variable(0.) step=t ...
- TF随笔-10
#!/usr/bin/env python# -*- coding: utf-8 -*-import tensorflow as tf x = tf.constant(2)y = tf.constan ...
- TF随笔-9
计算累加 #!/usr/bin/env python2 # -*- coding: utf-8 -*-"""Created on Mon Jul 24 08:25:41 ...
- TF随笔-8
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Jul 10 09:35:04 201 ...
- TF随笔-7
求平均值的函数 reduce_mean axis为1表示求行 axis为0表示求列 >>> xxx=tf.constant([[1., 10.],[3.,30.]])>> ...
- tf随笔-6
import tensorflow as tfx=tf.constant([-0.2,0.5,43.98,-23.1,26.58])y=tf.clip_by_value(x,1e-10,1.0)ses ...
- tf随笔-5
# -*- coding: utf-8 -*-import tensorflow as tfw1=tf.Variable(tf.random_normal([2,6],stddev=1))w2=tf. ...
随机推荐
- POJ1144:Network(无向连通图求割点)
题目:http://poj.org/problem?id=1144 求割点.判断一个点是否是割点有两种判断情况: 如果u为割点,当且仅当满足下面的1条 1.如果u为树根,那么u必须有多于1棵子树 2. ...
- uva1146 2-SAT问题
题意大白书 二分答案,然后对于每个可能的答案,跑一遍2-SAT就好了. #include <iostream> #include <string.h> #include < ...
- 解决android studio 模拟器取法启动声音的错误
Emulator: dsound: Reason: No sound driver is available https://jingyan.baidu.com/article/a65957f4348 ...
- JQuery+CSS3实现Ajax加载时loading效果
之前通过Ajax请求加载数据的时候,在数据还没有呈现出来前,为了更好的用户体验,总会弄个loading告诉用户其实内容正在加载,而不是网站崩了.但是貌似之前使用gif图片的情况比较多,可能是为了兼容各 ...
- pip安装tensorflow-gpu好慢怎么办
答:为pip换源,如换成清华源 cat ~/.pip/pip.conf(没有此文件,自行创建即可,然后加入以下内容) [global]index-url = https://pypi.tuna.tsi ...
- [调参]batch_size的选择
链接:https://www.zhihu.com/question/61607442/answer/440944387 首先反对上面的尽可能调大batch size的说法,在现在较前沿的视角来看,这种 ...
- 组学航母----OMICtools
OMICtools可谓是组学研究的航空母舰,其收集了基因组学.转录组学.蛋白质组学和代谢组学等分析研究常用的4400余个工具和数据库.它允许用户submit自己的工具/数据库,每一个上传的工具/数据库 ...
- CentOS环境Docker安装教程(官方推荐的docker三种方式安装)
CentOS环境Docker安装教程(官方推荐的docker三种方式安装) 一.使用yum方式安装 1.安装依赖包 $ sudo yum install -y yum-utils device-map ...
- python学习笔记(locust性能测试模块)
locust是基于python的性能测试工具.支持python2.7及其以上的版本.相对于主流的LR与Jmeter工具使用的方式不一样.locust是通过编写python代码来完成性能测试的. 通过L ...
- netty做集群 channel共享 方案
netty做集群 channel如何共享? 方案一: netty 集群,通过rocketmq等MQ 推送到所有netty服务端, channel 共享无非是要那个通道都可以发送消息向客户端, MQ广播 ...