tensorflow 笔记
tf.one_hot(matrix,depth...)
used to create a matrix converted from original input (classification) using one-hot code.
depth: used to control the output length. e.g.
input[0,2]
depth: 3 => [ [1,0,0],[0,0,1]]
depth: 4 => [[1,0,0,,0],[0,0,1,0]]
原创
2022-03-16 11:39:55 ·
328 阅读 ·
0 评论