当前位置:网站首页>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)
边栏推荐
- How to fix Windows 11 not finding files
- 《强化学习周刊》第57期:DL-DRL、FedDRL & Deep VULMAN
- 几种绘制时间线图的方法
- DSPE-PEG-Silane, DSPE-PEG-SIL, phospholipid-polyethylene glycol-silane modified silica particles
- 场效应管Mosfet之雷卯Leiditech对应英飞凌Infineon
- np中的round函数,ceil函数与floor函数
- NIO Cup 2022 Nioke Summer Multi-School Training Camp 7 CFGJ
- Tensorflow中使用convert_to_tensor去指定数据的类型
- LeetCode26:删除有序数组中的重复项
- 自监督学习 —— MoCo v2
猜你喜欢
Pagoda measurement - building LightPicture open source map bed system
Word第一页空白页怎么删除?删除Word第一页空白页方法教程
线段相交的应用
SQLi-LABS Page-2 (Adv Injections)
AI识万物:从0搭建和部署手语识别系统
抽象类 or 接口
Optimization of SQL Statements and Indexes
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
Word怎么设置图片衬于文字下方?两种方法教你设置Word图片衬于文字下方
[Generic Programming] Full Detailed Explanation of Templates
随机推荐
CVPR22 Oral|通过多尺度token聚合分流自注意力,代码已开源
SQL语句及索引的优化
Daily practice of PMP | Do not get lost in the exam -8.8 (including agility + multiple choice)
TF中random.normal()与random.truncated_normal()
Optimization of SQL Statements and Indexes
STC8H development (15): GPIO drive Ci24R1 wireless module
【泛型编程】模板全详解
FET Mosfet Leiditech corresponds to Infineon Infineon
STC8H开发(十五): GPIO驱动Ci24R1无线模块
什么是IDE(集成开发环境)?
【Efficient Tools】Remote Control Software ToDesk (Favorites)
POWER SOURCE ETA埃塔电源维修FHG24SX-U概述
C语言预处理命令是什么?
MySQL:错误1153(08S01):得到的数据包大于“ max_allowed_packet”字节
【stack】【queue】【priority_queue】【deque】详解
TF使用constant生成数据
ACM MM 2022 | Cloud2Sketch: Painting with clouds in the sky, AI brush strokes
Unity_物体自转
论文解读(DropEdge)《DropEdge: Towards Deep Graph Convolutional Networks on Node Classification》
Wps下划线怎么弄?Wps添加下划线的最全方法