当前位置:网站首页>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))
边栏推荐
- Resolved EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
- 2022年中国软饮料市场洞察
- 软件测试基本流程有哪些?北京专业第三方软件检测机构安利
- unable to extend table xxx by 1024 in tablespace xxxx
- 易观分析联合中小银行联盟发布海南数字经济指数,敬请期待!
- Unity开发者必备的C#脚本技巧
- 【@网络工程师:用好这6款工具,让你的工作效率大翻倍!】
- js判断图片是否存在
- linux 安装mysql服务报错
- Taobao product details API interface
猜你喜欢
随机推荐
redis操作
为什么我使用C#操作MySQL进行中文查询失败
Internet phone software or consolidation of attack must be "free" calls security clearance
MindManager2022全新正式免费思维导图更新
A used in the study of EEG ultra scanning analysis process
Multiscale communication in cortical-cortical networks
从苹果、SpaceX等高科技企业的产品发布会看企业产品战略和敏捷开发的关系
1061 判断题 (15 分)
opencv实现数据增强(图片+标签)平移,翻转,缩放,旋转
年薪40W测试工程师成长之路,你在哪个阶段?
2022-08-09 Group 4 Self-cultivation class study notes (every day)
【@网络工程师:用好这6款工具,让你的工作效率大翻倍!】
1101 B是A的多少倍 (15 分)
How Unity programmers can improve their abilities
关于Excel实现分组求和最全文档
从何跟踪伦敦金最新行情走势?
Redis源码:Redis源码怎么查看、Redis源码查看顺序、Redis外部数据结构到Redis内部数据结构查看源码顺序
基于FPGA的FIR滤波器的实现(4)— 串行结构FIR滤波器的FPGA代码实现
ROS 话题通信理论模型
机器学习总结(二)