当前位置:网站首页>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)

边栏推荐
- STC8H Development (15): GPIO Drives Ci24R1 Wireless Module
- Simulation of Water Temperature Control System Based on Fuzzy PID Controller
- 别叫我玩,我要考PMP:考PMP选择机构需要了解的那些事儿
- Unity2D_线框材质
- 小黑leetcode清爽雨天之旅,刚吃完宇飞牛肉面、麻辣烫和啤酒:112. 路径总和
- UE4_定序器控制蓝图对象
- 【stack】【queue】【priority_queue】【deque】Detailed explanation
- Visual studio 2022 debugging skills introduction
- 小黑leetcode之旅:94. 二叉树的中序遍历(补充Morris 中序遍历)
- POWER SOURCE ETA埃塔电源维修FHG24SX-U概述
猜你喜欢

Application of Acrel5000web Energy Consumption System in a College-Susie Week

knn到底咋回事?

抽象类 or 接口

UE4_定序器控制蓝图对象

上海控安SmartRocket系列产品推介(三):SmartRocket iVerifier计算机联锁系统验证工具

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

Ali Ermi: Without accept, can a TCP connection be established?

cad图纸怎么复制到word文档里面?Word里插CAD图怎么弄?

AI识万物:从0搭建和部署手语识别系统

ACM MM 2022 | Cloud2Sketch: 长空云作画,AI笔生花
随机推荐
Problems with compiling SIP with QGIS
宝塔实测-搭建LightPicture开源图床系统
MySQL慢查询的多个原因
Word怎么设置图片衬于文字下方?两种方法教你设置Word图片衬于文字下方
什么是IDE(集成开发环境)?
Definition and Basic Operations of Sequence Tables
TF中使用zeros(),ones(), fill()方法生成数据
FET Mosfet Leiditech corresponds to Infineon Infineon
SecureCRT强制卸载
【云原生】4.2 DevOps 精讲篇
编程时请选择正确的输入法,严格区分中英文
Unity2D_线框材质
LeetCode Daily Question (321. Create Maximum Number)
SecureCRT背景配色
微软Excel表格点击单元格行和列都显示颜色怎么弄?聚光灯效果设置
单元测试
ACM MM 2022 | Cloud2Sketch: 长空云作画,AI笔生花
【Efficient Tools】Remote Control Software ToDesk (Favorites)
Unity_平滑移动
DSPE-PEG-Silane, DSPE-PEG-SIL, phospholipid-polyethylene glycol-silane modified silica particles