tensorflow的函数
来源:互联网 发布:java技术文档怎么写 编辑:程序博客网 时间:2024/05/16 11:14
2 tf.reshape(tensor, shape, name=None)
函数的作用是将tensor变换为参数shape的形式。
其中shape为一个列表形式,特殊的一点是列表中可以存在-1。-1代表的含义是不用我们自己指定这一维的大小,函数会自动计算,但列表中只能存在一个-1。(当然如果存在多个-1,就是一个存在多解的方程了)
例子:
1 tf.truncated_normal():
tf.truncated_normal(shape, mean=0.0, stddev=1.0, dtype=tf.float32, seed=None, name=None)
Outputs random values from a truncated normal distribution.
从一个正态分布片段中输出随机数值
The generated values follow a normal distribution with specified mean and standard deviation, except that values whose magnitude is more than 2 standard deviations from the mean are dropped and re-picked.
生成的值会遵循一个指定了平均值和标准差的正态分布,只保留两个标准差以内的值,超出的值会被弃掉重新生成。
Args:
shape: A 1-D integer Tensor or Python array. The shape of the output tensor.
mean: A 0-D Tensor or Python value of typedtype. The mean of the truncated normal distribution.
stddev: A 0-D Tensor or Python value of typedtype. The standard deviation of the truncated normal distribution.
dtype: The type of the output.
seed: A Python integer. Used to create a random seed for the distribution. Seeset_random_seedfor behavior.
name: A name for the operation (optional).
参数:
shape: 一个一维整数张量 或 一个Python数组。 这个值决定输出张量的形状。
mean: 一个零维张量或 类型属于dtype的Python值. 这个值决定正态分布片段的平均值
stddev: 一个零维张量或 类型属于dtype的Python值. 这个值决定正态分布片段的标准差。
dtype: 输出的类型.
seed: 一个Python整数. 被用来为正态分布创建一个随机种子. 详情可见set_random_seedfor behavior.
name: 操作的名字 (可选参数).
Returns:
A tensor of the specified shape filled with random truncated normal values.
一个指定形状并用正态分布片段的随机值填充的张量
- TensorFlow的reduce_sum()函数
- tensorflow的函数
- TensorFlow的variables_to_restore函数
- TensorFlow的convert_variables_to_constants函数
- TensorFlow的convert_variables_to_constants函数
- Tensorflow | 函数名字的更新
- tensorflow 函数接口的理解
- TensorFlow 里的线性函数
- Tensorflow里的reshape函数
- tensorflow的一些基本函数
- Tensorflow的一些常见函数
- Tensorflow 学习与复习 Epoch_1 # tensorflow的一些函数方法
- 【Tensorflow】Tensorflow一些数据IO、图的运行相关函数
- tensorflow的tf.equal()函数的使用方法
- tensorflow的tf.reduce_mean()函数的使用方法
- TensorFlow从图像提取区域的函数
- tensorflow 一些常用函数的功能
- Tensorflow中reshape()函数的使用
- 有return的情况下try catch finally的执行顺序(最有说服力的总结)
- 我们来尝试APK瘦身框架!
- JSPf分页技术
- 张一鸣、王兴、蔡文胜,福建人为什么爱做流量生意
- 1010. Radix (25)
- tensorflow的函数
- Android 传输数据时Base64编码算法详解
- Java byte转化成String
- 字符串函数---strstr()、memchr()、strchr()详解及实现
- 1011. World Cup Betting (20)
- 关键概念
- Java_GUI创建单机版QQ聊天小程序并实现简单的小功能(附所有源码)
- PET
- java反射机制判断对象所有属性是否全部为空