当前位置:网站首页>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))
边栏推荐
猜你喜欢
随机推荐
Tidb二进制集群搭建
1091 N-自守数 (15 分)
When MySQL uses GROUP BY to group the query, the SELECT query field contains non-grouping fields
TF中的四则运算
接口测试的基础流程和用例设计方法你知道吗?
Implementation of FIR filter based on FPGA (5) - FPGA code implementation of parallel structure FIR filter
ROS 服务通信理论模型
cdc连sqlserver异常对象可能有无法序列化的字段 有没有大佬看得懂的 帮忙解答一下
计算YUV文件的PSNR与SSIM
Activity的四种启动模式
线程交替输出(你能想出几种方法)
基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
Unity程序员如何提升自己的能力
ssh服务攻防与加固
Pytorch模型转ONNX模型
1046 划拳 (15 分)
NTT的Another Me技术助力创造歌舞伎演员中村狮童的数字孪生体,将在 “Cho Kabuki 2022 Powered by NTT”舞台剧中首次亮相
那些事情是用Unity开发项目应该一开始规划好的?如何避免后期酿成巨坑?
Tf中的平方,多次方,开方计算
年薪40W测试工程师成长之路,你在哪个阶段?









