当前位置:网站首页>TF generates (feature, label) set through feature and label, tf.data.Dataset.from_tensor_slices
TF generates (feature, label) set through feature and label, tf.data.Dataset.from_tensor_slices
2022-08-11 07:51:00 【phac123】
Numpy and Tensor formats can be used to read data with this statement
data = tf.data.Dataset.from_tensor_slices((Enter feature , tag ))
Code
import tensorflow as tffeatures = tf.constant([12, 23, 10, 17])labels = tf.constant([0, 1, 1, 0])dataset = tf.data.Dataset.from_tensor_slices((features, labels))print(dataset)for element in dataset:print(element)
边栏推荐
- 6月各手机银行活跃用户较快增长,创半年新高
- 囍楽云任务源码
- CIKM 2022 AnalytiCup Competition: 联邦异质任务学习
- SQL sliding window
- TF中的条件语句;where()
- Depth (relay supervision)
- Redis source code-String: Redis String command, Redis String storage principle, three encoding types of Redis string, Redis String SDS source code analysis, Redis String application scenarios
- 数仓开发知识总结
- 【Pytorch】nn.Linear,nn.Conv
- 2.1-梯度下降
猜你喜欢
随机推荐
MindManager2022全新正式免费思维导图更新
如何选择专业、安全、高性能的远程控制软件
1071 Small Gamble (15 points)
2021-08-11 for循环结合多线程异步查询并收集结果
Waldom Electronics宣布成立顾问委员会
3.2-分类-Logistic回归
接口测试的基础流程和用例设计方法你知道吗?
How to choose professional, safe and high-performance remote control software
Tidb二进制集群搭建
【LaTex-错误和异常】\verb ended by end of line.原因是因为闭合边界符没有在\verb命令所属行中出现;\verb命令的正确和错误用法、verbatim环境的用法
结合均线分析k线图的基本知识
Pytorch模型转ONNX模型
1091 N-Defensive Number (15 points)
The most complete documentation on Excel's implementation of grouped summation
【推荐系统】:协同过滤和基于内容过滤概述
How do you optimize the performance of your Unity project?
【软件测试】(北京)字节跳动科技有限公司二面笔试题
1002 写出这个数 (20 分)
基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
TF中的One-hot