当前位置:网站首页>tf.cast(), reduce_min(), reduce_max()
tf.cast(), reduce_min(), reduce_max()
2022-08-11 07:47:00 【phac123】
Article table of contents
Introduction
In tensorflow, you can use tf.cast() to convert the type of tensor variables. Use tf.reduce_min and tf.reduce_max to calculate the maximum and minimum values of elements on the tensor.
implemented
import tensorflow as tfx1 = tf.constant([1., 2., 3.], dtype = tf.float64)print("x1: ", x1)x2 = tf.cast(x1, tf.int32)print("x2: ", x2)print("minimum of x2: ", tf.reduce_min(x2))print("maxmum of x2: ", tf.reduce_max(x2))
边栏推荐
- 1061 判断题 (15 分)
- 【LeetCode每日一题】——844.比较含退格的字符串
- Production and optimization of Unity game leaderboards
- Go语言实现Etcd服务发现(Etcd & Service Discovery & Go)
- Unity3D 学习路线?
- Resolved EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
- 1046 划拳 (15 分)
- buu—Re(5)
- 机器学习总结(二)
- 你是如何做好Unity项目性能优化的
猜你喜欢
关于Excel实现分组求和最全文档
囍楽云任务源码
exness:黄金1800关口遇阻,静待美国CPI出炉
下一代 无线局域网--强健性
6月各手机银行活跃用户较快增长,创半年新高
Taobao product details API interface
1046 划拳 (15 分)
Douyin get douyin share password url API return value description
语音信号处理:预处理【预加重、分帧、加窗】
【LaTex-错误和异常】\verb ended by end of line.原因是因为闭合边界符没有在\verb命令所属行中出现;\verb命令的正确和错误用法、verbatim环境的用法
随机推荐
2022-08-09 第四小组 修身课 学习笔记(every day)
Depth (relay supervision)
网络电话软件或迎整顿 “免费”通话须迈安全关
C语言每日一练——Day02:求最小公倍数(3种方法)
Shell:三剑客之awk
恒源云-Pycharm远程训练避坑指南
tf.reduce_mean()与tf.reduce_sum()
opencv实现数据增强(图片+标签)平移,翻转,缩放,旋转
PIXHAWK飞控使用RTK
1071 小赌怡情 (15 分)
动态代理学习
CIKM 2022 AnalytiCup Competition: 联邦异质任务学习
软件测试基本流程有哪些?北京专业第三方软件检测机构安利
TF通过feature与label生成(特征,标签)集合,tf.data.Dataset.from_tensor_slices
TF中使用softmax函数;
Pico neo3在Unity中的交互操作
2022年中国软饮料市场洞察
maxwell concept
从苹果、SpaceX等高科技企业的产品发布会看企业产品战略和敏捷开发的关系
prometheus学习5altermanager