当前位置:网站首页>random.normal() and random.truncated_normal() in TF
random.normal() and random.truncated_normal() in TF
2022-08-09 23:11:00 【phac123】
Brief
The tf.random.normal() and tf.random.truncated_normal() methods are commonly used in TF to create Tensors that conform to the normal distribution.
The difference between them is that the latter guarantees the value of randomly generated dataBetween (μ-2σ, μ+2σ), if the generated data exceeds this range, re-generate.
μ: mean, σ: standard deviation
Code
import tensorflow as tfd = tf.random.normal([2,span> 2], mean = 0.5, stddev = 1)print("d: ", d)e = tf.random.truncated_normal([2,span> 2], mean = 0.5, stddev = 1)print("e: ", e)
边栏推荐
- 场效应管Mosfet之雷卯Leiditech对应英飞凌Infineon
- 【stack】【queue】【priority_queue】【deque】Detailed explanation
- RHEL7系统修复rm -rf /boot /etc/fstab
- 蔚来杯2022牛客暑期多校训练营7 CFGJ
- LoRa无线技术在物联网应用市场的概况和发展
- Access Characteristics of Constructor under Inheritance Relationship
- Word怎么设置图片衬于文字下方?两种方法教你设置Word图片衬于文字下方
- Photometric Stereo 光度立体法三维重建
- APP自动化测试框架-UiAutomator2基础入门
- MySQL慢查询的多个原因
猜你喜欢
Optimization of SQL Statements and Indexes
poj 3070 Fibonacci(简单矩阵连乘)
APP自动化测试框架-UiAutomator2基础入门
What to do if Windows 11 can't find Internet Explorer
Reinforcement Learning Weekly Issue 57: DL-DRL, FedDRL & Deep VULMAN
cadence中复制一部分PCB到另一个PCB中去
windos安装Mysql8.0,及解决重新登录异常问题 ERROR 1045 (28000)
Simulation of Water Temperature Control System Based on Fuzzy PID Controller
编程时请选择正确的输入法,严格区分中英文
Jmeter 使用正则表达式提取器将返回值全部保存到一个文件中
随机推荐
普源精电上半年扭亏为盈,高端产品持续发力!你看好仪器界“华为”吗?
LoRa Basics无线通信技术和应用案例详解
小黑leetcode清爽雨天之旅,刚吃完宇飞牛肉面、麻辣烫和啤酒:112. 路径总和
Bean生命周期
Unity2D_线框材质
np中的round函数,ceil函数与floor函数
Daily practice of PMP | Do not get lost in the exam -8.8 (including agility + multiple choice)
kvm虚拟机出现启动不了,NOT available,PV大于分区
Tensorflow中placeholder函数的用法
[Graphic and textual] How to reinstall Win7 system
Several ways to draw timeline diagrams
hdu 1503 Advanced Fruits(最长公共子序列的应用)
DSPE-PEG-Silane, DSPE-PEG-SIL, phospholipid-polyethylene glycol-silane modified silica particles
威纶通触摸屏制作自定义弹出窗口的具体方法(3种)
【stack】【queue】【priority_queue】【deque】详解
APP自动化测试框架-UiAutomator2基础入门
TF中使用zeros(),ones(), fill()方法生成数据
json事例
题解:Edu Codeforces 109(div2)
人人都可以DIY的大玩具,宏光MINIEV GAMEBOY产品力强,出行新装备