当前位置:网站首页>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)
边栏推荐
- 【云原生】4.2 DevOps 精讲篇
- Ali Ermi: Without accept, can a TCP connection be established?
- APP automation test framework - UiAutomator2 introductory
- Don't use array.length-1 to get the last item of the array
- DSPE-PEG-Azide, DSPE-PEG-N3, phospholipid-polyethylene glycol-azide can react directly with DBCO
- Wps下划线怎么弄?Wps添加下划线的最全方法
- CVPR22 Oral|通过多尺度token聚合分流自注意力,代码已开源
- Daily practice of PMP | Do not get lost in the exam -8.8 (including agility + multiple choice)
- Word怎么制作双面席卡?使用Word制作双面席卡方法
- C语言中的文件是什么?
猜你喜欢
随机推荐
FS4066耐高压1到4节内置MOS的锂电池充电管理芯片
RHEL7系统修复rm -rf /boot /etc/fstab
Unity2D_背景粒子效果
自监督学习 —— MoCo v2
MySQL跨表、多表更新SQL语句总结
基于Docker构建MySQL主从复制数据库
Tensorflow模型整体构建流程
laravel 表迁移报错[通俗易懂]
在VMware上安装win虚拟机
TF使用constant生成数据
LoRa Basics无线通信技术和应用案例详解
论文解读(DropEdge)《DropEdge: Towards Deep Graph Convolutional Networks on Node Classification》
小黑leetcode清爽雨天之旅,刚吃完宇飞牛肉面、麻辣烫和啤酒:112. 路径总和
人人都可以DIY的大玩具,宏光MINIEV GAMEBOY产品力强,出行新装备
Word怎么制作一张标准的答题卡?
蔚来杯2022牛客暑期多校训练营7 CFGJ
Interviewer: How to deal with Redis big key?
【stack】【queue】【priority_queue】【deque】Detailed explanation
SecureCRT背景配色
SQLi-LABS Page-2 (Adv Injections)