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.Session() as sess: print sess.run(res1) print sess.run(res2)
输出:
1.66666666667
1
TF随笔-13的更多相关文章
- TF随笔-4
>>> import tensorflow as tf>>> a=tf.constant([[1,2],[3,4]])>>> b=tf.const ...
- 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. ...
- TF随笔-3
>>> import tensorflow as tf>>> node1 = tf.constant(3.0, dtype=tf.float32)>>& ...
随机推荐
- sipp保持sip协议的tcp长连接
sipp这个工具非常有用,但是由于应用手册不完善,加上资料非常少,所以要用熟练是非常不容易的.
- Linq Query常见错误
1.只能对 Type.IsGenericParameter 为 True 的类型调用方法 对于此错误,一般常见在虚拟实体,但是要把条件拼接在Expression中,通常是因为该字段在数据库中是可空的, ...
- 2017ACM/ICPC Guangxi Invitational Solution
A: A Math Problem 题意:给出一个n,找出有多少个k满足kk <= n 思路: kk的增长很快,当k == 16 的时候就已经超过1e18 了,对于每一次询问,暴力一下就可以 ...
- uva672
Gangsters N gangsters are going to a restaurant. The i-th gangster comes at the time Ti and has t ...
- MFC中Doc类获取View类的方法(SDI)
从view类中获取Doc的方法如下: CYourDoc* pDoc = GetDocument(); 这个函数已经写好,所以无需自己添加,使用时直接利用pDoc即可. 若反过来,从Doc中获取View ...
- springcloud20---Config加入eureka
Config server也可以加用户名和密码.Config client通过用户名和密码访问. Config server也可以做成高可用集群. Config与eureka配置使用.把Config ...
- duilib : 滑动显示的窗口实现以及 悬浮窗 (转载)
1. vc 判断窗口是否显示 BOOL IsWindowVisible(HWND hWnd); 2.悬浮窗 http://blog.csdn.net/lincyang/article/details ...
- ubuntu18.04下挂载网络文件系统失败【学习笔记】
作者:庄泽彬(欢迎转载,请注明作者) PC: ubuntu18.04 说明: 之前ubuntu16.04下搭建的环境,开发板挂载网络文件系统是ok的,但是换到ubuntu18.04在启动的时候 ...
- POJ 1170 Shopping Offers(完全背包+哈希)
http://poj.org/problem?id=1170 题意:有n种花的数量和价格,以及m种套餐买法(套餐会便宜些),问最少要花多少钱. 思路:题目是完全背包,但这道题目不好处理的是套餐的状态, ...
- Java中含有静态成员的的初始化顺序
class Bowl{ Bowl(int marker){ System.out.println("Bowl(" + marker + ")" ); } voi ...