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

边栏推荐
- CVPR22 Oral|通过多尺度token聚合分流自注意力,代码已开源
- Access Characteristics of Constructor under Inheritance Relationship
- Byte side: Can TCP and UDP use the same port?
- PMP每日一练 | 考试不迷路-8.9(包含敏捷+多选)
- TF中使用zeros(),ones(), fill()方法生成数据
- TF生成均匀分布的tensor
- Cookie、session、token
- Jmeter 使用正则表达式提取器将返回值全部保存到一个文件中
- leetcode:数组中的第K个最大元素
- mysql多表左链接查询
猜你喜欢

Lyapp exponents and bifurcation diagrams for fractional chaotic systems

APP automation test framework - UiAutomator2 introductory

4D Summary: 38 Knowledge Points of Distributed Systems

ACM MM 2022 | Cloud2Sketch: 长空云作画,AI笔生花

Word怎么制作双面席卡?使用Word制作双面席卡方法

宝塔实测-搭建LightPicture开源图床系统

微软Excel表格点击单元格行和列都显示颜色怎么弄?聚光灯效果设置

FS4066耐高压1到4节内置MOS的锂电池充电管理芯片
6个规则去净化你的代码

论文解读(DropEdge)《DropEdge: Towards Deep Graph Convolutional Networks on Node Classification》
随机推荐
凸集与凸函数
微软word怎么转换成pdf文件?微软word转换为pdf格式的方法
windos安装Mysql8.0,及解决重新登录异常问题 ERROR 1045 (28000)
10个 Istio 流量管理 最常用的例子,你知道几个?
Photometric Stereo 光度立体法三维重建
mysql配置参数详解[通俗易懂]
自监督学习 —— MoCo v2
Simulation of Water Temperature Control System Based on Fuzzy PID Controller
AI识万物:从0搭建和部署手语识别系统
简单问题窥见数学
编程语言中,取余和取模的区别
Tensorflow模型整体构建流程
CVPR22 Oral | shunt through multi-scale token polymerization from attention, code is open source
LeetCode26:删除有序数组中的重复项
场效应管Mosfet之雷卯Leiditech对应英飞凌Infineon
【云原生】4.2 DevOps 精讲篇
Cookie、session、token
MySQL:错误1153(08S01):得到的数据包大于“ max_allowed_packet”字节
CVPR22 Oral|通过多尺度token聚合分流自注意力,代码已开源
ACM MM 2022 | Cloud2Sketch: Painting with clouds in the sky, AI brush strokes