当前位置:网站首页>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报错
边栏推荐
- Pinduoduo API interface (attach my available API)
- 已解决EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
- Douyin get douyin share password url API return value description
- LeetCode brushing series -- 46. Full arrangement
- Get Pinduoduo product information operation details
- Daily sql--statistics the total salary of employees in the past three months (excluding the latest month)
- Trill keyword search goods - API
- 每日sql:求好友申请通过率
- Shell:三剑客之awk
- MySQL使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段
猜你喜欢

Amazon API interface Daquan

Amazon Get AMAZON Product Details API Return Value Description

实现通用的、高性能排序和快排优化

数仓开发知识总结

一种用于EEG超扫描研究的分析流程

Douyin API interface

When MySQL uses GROUP BY to group the query, the SELECT query field contains non-grouping fields

exness:黄金1800关口遇阻,静待美国CPI出炉

ROS 话题通信理论模型

Daily sql-statistics of the number of professionals (including the number of professionals is 0)
随机推荐
【Pytorch】nn.ReLU(inplace=True)
每日sql -查询至少有5名下属的经理和选举
Discourse 的关闭主题(Close Topic )和重新开放主题
radix-4 FFT principle and C language code implementation
Unity底层是如何处理C#的
【Pytorch】nn.PixelShuffle
恒源云-Pycharm远程训练避坑指南
JD.com product details API call example explanation
伦敦银规则有哪些?
LeetCode brushing series -- 46. Full arrangement
2022年中国软饮料市场洞察
Service的两种状态形式
exness:黄金1800关口遇阻,静待美国CPI出炉
PIXHAWK飞控使用RTK
一张图了解JVM八大原子操作
从 dpdk-20.11 移植 intel E810 百 G 网卡 pmd 驱动到 dpdk-16.04 中
sql--7天内(含当天)购买次数超过3次(含),且近7天的购买金额超过1000的用户
NFT 的价值从何而来
Pytorch模型转ONNX模型
2022-08-09 Group 4 Self-cultivation class study notes (every day)