当前位置:网站首页>TF uses constant to generate data
TF uses constant to generate data
2022-08-09 23:11:00 【phac123】
简介
TFThe generated data type is specified,The final generated data is the specified type;如果TF中使用constantIt is not specified what data is generated,如果是1,4这样的整数,Then the default data type is tf.int32.
实现与分析
One
import tensorflow as tf
a = tf.constant([1, 5], dtype = tf.int64)
print("a: ", a)
print("a.dtype: ", a.dtype)
print("a.shape: ", a.shape)

Two:默认
import tensorflow as tf
a = tf.constant([1, 5])
print("a: ", a)
print("a.dtype: ", a.dtype)
print("a.shape: ", a.shape)

three
import tensorflow as tf
a = tf.constant([1, 5], dtype = tf.float32)
print("a: ", a)
print("a.dtype: ", a.dtype)
print("a.shape: ", a.shape)

边栏推荐
猜你喜欢

线段相交的应用
![[corctf 2022] 部分](/img/03/ee1ead55805a2ac690ec79c675c3e6.png)
[corctf 2022] 部分

万字总结:分布式系统的38个知识点
![[Graphic and textual] How to reinstall Win7 system](/img/24/3acccb93e5e219f39477dc77229a58.png)
[Graphic and textual] How to reinstall Win7 system

Definition and Basic Operations of Sequence Tables

fixed investment fund

小黑leetcode之旅:94. 二叉树的中序遍历(补充Morris 中序遍历)

Byte side: Can TCP and UDP use the same port?

ACM MM 2022 | Cloud2Sketch: Painting with clouds in the sky, AI brush strokes

XXE-XML外部实体注入-知识点
随机推荐
matlab neural network ANN classification
Pagoda measurement - building LightPicture open source map bed system
kvm虚拟机出现启动不了,NOT available,PV大于分区
必看设计干货|易知微设计师是怎么做标准可视化设计服务的?
PMP每日一练 | 考试不迷路-8.9(包含敏捷+多选)
gmail+mtalk配合打免费网络电话。
编程语言中,取余和取模的区别
LeetCode26:删除有序数组中的重复项
Tensorflow模型整体构建流程
【泛型编程】模板全详解
Interviewer: How to deal with Redis big key?
Wps下划线怎么弄?Wps添加下划线的最全方法
Don't tell me to play, I'm taking the PMP exam: what you need to know about choosing an institution for the PMP exam
[corctf 2022] section
LeetCode Daily Question (321. Create Maximum Number)
STC8H开发(十五): GPIO驱动Ci24R1无线模块
Visual studio 2022 debugging skills introduction
Jmeter 使用正则表达式提取器将返回值全部保存到一个文件中
LoRa无线技术在物联网应用市场的概况和发展
Hessian Matrix 海森矩阵