当前位置:网站首页>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))
边栏推荐
猜你喜欢
随机推荐
1056 组合数的和 (15 分)
MindManager2022全新正式免费思维导图更新
radix-4 FFT principle and C language code implementation
常见激活函数及其导数
进制转换间的那点事
从苹果、SpaceX等高科技企业的产品发布会看企业产品战略和敏捷开发的关系
【推荐系统】:协同过滤和基于内容过滤概述
prometheus学习4Grafana监控mysql&blackbox了解
DDR4内存条电路设计
Amazon API interface Daquan
Discourse 的关闭主题(Close Topic )和重新开放主题
What are the things that should be planned from the beginning when developing a project with Unity?How to avoid a huge pit in the later stage?
Service的两种启动方式与区别
1071 小赌怡情 (15 分)
Daily sql--statistics the total salary of employees in the past three months (excluding the latest month)
接入网、承载网、核心网是什么,交换机路由器是什么、这个和网络的协议有什么关系呢?
下一代 无线局域网--强健性
Multiscale communication in cortical-cortical networks
exness:黄金1800关口遇阻,静待美国CPI出炉
国密规范 SM2 SM3 SM4








