tf.one_hot 实例
来源:互联网 发布:吉他班一般多少钱知乎 编辑:程序博客网 时间:2024/06/07 03:32
Examples
=========
Suppose that
indices = [0, 2, -1, 1]
depth = 3
on_value = 5.0
off_value = 0.0
axis = -1
Then output is [4 x 3]
:
output =
[5.0 0.0 0.0]
[0.0 0.0 5.0]
[0.0 0.0 0.0]
[0.0 5.0 0.0]
Suppose that
indices = [[0, 2], [1, -1]]
depth = 3
on_value = 1.0
off_value = 0.0
axis = -1
Then output is [2 x 2 x 3]
:
output =
[
[1.0, 0.0, 0.0]
[0.0, 0.0, 1.0]
][
[0.0, 1.0, 0.0]
[0.0, 0.0, 0.0]
]
Using default values for on_value
and off_value
:
indices = [0, 1, 2]
depth = 3
The output will be
output =
[[1., 0., 0.],
[0., 1., 0.],
[0., 0., 1.]]
阅读全文
0 1
- tf.one_hot 实例
- tf.one_hot()使用
- tensorflow--tf.one_hot()函数示例
- tensorflow学习笔记--tf.one_hot
- tf.one_hot()进行独热编码
- tensorflow——tf.one_hot以及tf.sparse_to_dense函数
- Tensorflow 的tf.one_hot()功能:dense to one hot
- tf.one_hot(indices, depth, on_value=None, off_value=None, axis=None)
- tf.nn.conv2d 实例
- tf.nn.max_pool 实例
- tf.select 实例
- tf.nn.atrous_conv2d 实例
- tf.gather 实例
- tf.strided_slice 实例
- tensorflow tf.tile 实例
- tf.where 实例
- tf.where 实例2
- tensorflow tf.stack tf.unstack 实例
- Configuration--environments--transactionManager(三-5-2)
- Network Saboteur (深搜)
- SSLHandshakeException
- ajax上传表单带附件
- OpenCV(一) 主要模块及结构功能简述
- tf.one_hot 实例
- <8/3>集训日记
- Spring的自动代理
- 训练总结 8.3
- if语句常见的错误
- Android studio 更新android SDK
- 万年历
- 对Tomcat的调优
- Socket通信原理和实践