当前位置:网站首页>TF中的One-hot
TF中的One-hot
2022-08-11 06:45:00 【phac123】
- tf.one_hot (待转换数据, depth=几分类)
import tensorflow as tf
classes = 3
labels = tf.constant([1, 0, 2])
output = tf.one_hot(labels, classes)
print(output)
注: 当列表中的变量带有小数的时候,one-hot报错
边栏推荐
- 【预约观看】Ambire 智能钱包 AMA 活动第四期即将举行
- 【软件测试】(北京)字节跳动科技有限公司终面HR面试题
- 李沐d2l(十)--卷积层Ⅰ
- redis + lua实现分布式接口限流实现方案
- Production and optimization of Unity game leaderboards
- 基于FPGA的FIR滤波器的实现(4)— 串行结构FIR滤波器的FPGA代码实现
- 【Pytorch】nn.Linear,nn.Conv
- Depth (relay supervision)
- How do you optimize the performance of your Unity project?
- 基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
猜你喜欢
机器学习总结(二)
从何跟踪伦敦金最新行情走势?
每日sql:求好友申请通过率
Get Pinduoduo product information operation details
技能在赛题解析:交换机防环路设置
ROS 话题通信理论模型
easyrecovery15数据恢复软件收费吗?功能强大吗?
Redis源码:Redis源码怎么查看、Redis源码查看顺序、Redis外部数据结构到Redis内部数据结构查看源码顺序
prometheus学习5altermanager
已解决EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
随机推荐
语音信号处理:预处理【预加重、分帧、加窗】
Edge provides label grouping functionality
Unity游戏排行榜的制作与优化
Daily sql-statistics of the number of professionals (including the number of professionals is 0)
易观分析联合中小银行联盟发布海南数字经济指数,敬请期待!
Unity底层是如何处理C#的
【LeetCode每日一题】——844.比较含退格的字符串
Trill keyword search goods - API
MySQL使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段
Douyin API interface
深度监督(中继监督)
Multiscale communication in cortical-cortical networks
从 dpdk-20.11 移植 intel E810 百 G 网卡 pmd 驱动到 dpdk-16.04 中
Do not add the is prefix to the variables of the boolean type in the POJO class of the Alibaba specification
梅科尔工作室——BP神经网络
jar服务导致cpu飙升问题-带解决方法
Service的两种状态形式
unable to extend table xxx by 1024 in tablespace xxxx
机器学习总结(二)
【软件测试】(北京)字节跳动科技有限公司终面HR面试题