tf.random_uniform的使用
来源:互联网 发布:ubuntu root默认密码 编辑:程序博客网 时间:2024/06/08 02:59
tf.random_uniform((4, 4), minval=low,maxval=high,dtype=tf.float32)))返回4*4的矩阵,产生于low和high之间,产生的值是均匀分布的。
例如:
import tensorflow as tfimport numpy as npwith tf.Session() as sess: print(sess.run(tf.random_uniform( (4, 4), minval=-0.5, maxval=0.5,dtype=tf.float32)))输出:
[[ 0.23706067 0.42579055 0.16444612 0.12134457]
[ 0.14245582 0.32224071 -0.3107301 0.29911542]
[-0.03472292 -0.37411058 -0.22680879 0.21656895]
[-0.37798405 0.31725729 -0.17690742 -0.02995324]]
阅读全文
1 0
- tf.random_uniform的使用
- tf.random_uniform的使用
- tf.random_uniform的使用
- tensorflow生成随机数的操作 tf.random_normal & tf.random_uniform & tf.truncated_normal & tf.random_shuffle
- [TensorFlow] demo1 tf.random_uniform 函数
- tf.argmax的使用
- tf.equal的使用
- TF库的使用
- tf.cast的使用
- tf.get_variable函数的使用
- tf.nn.embedding_lookup()的使用
- tf.get_variable函数的使用
- Tensorflow中tf.get_variable和tf.variable_scope的使用
- tf 使用
- TF库的使用与理解
- tf.nn.rnn_cell.GRUCell函数的使用
- 【tensorflow】scope的使用以及tf.Variable()和tf.get_variable()的区别
- tf.contrib.slim.conv2d ()和tf.nn.conv2d()的使用区别
- 计算机网络——物理层和数据链路层
- JMeter 集合点设置之Synchronizing Timer的使用
- hdu 2037 今年暑假不AC
- OpenCV——WIN10+VS2015配置
- TCP的主要特性
- tf.random_uniform的使用
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- 抓包工具原理
- Trie树——字符串的插入和查找
- Java编程思想-17容器深入研究
- python装饰器执行顺序
- 第七天 如何File操作过滤os下的.exe后缀的的运行程序?
- Java内部类总结
- 实体类成员在页面的小细节