其他分享
首页 > 其他分享> > 分类贴标签

分类贴标签

作者:互联网

DataFrame分类贴标签

y = np.argmax(tf.nn.softmax(encoded_imgs), axis=1)
data_before.loc[:, 'labels'] = y
df1 = data_before[data_before['labels'] == 0]
df2 = data_before[data_before['labels'] == 1]
df3 = data_before[data_before['labels'] == 2]

tf.tensor分类贴标签

y =tf.argmax(tf.nn.softmax(encoden_imgs), axis=1)
y=tf.cast(y,dtype='float32')#(100,),epochs=100
y=tf.expand_dims(y,axis=-1)#扩展维度(100,1)
y_actual= tf.concat([y_actual,y],axis=1)#(100,11)+(100,1)=(100,12)
# y_actual['labels'] = y
df1 = y_actual[y_actual[:,12] == 0]
df2 = y_actual[y_actual[:,12] == 1]
df3 = y_actual[y_actual[:,12] == 2]

标签:labels,actual,分类,贴标签,tf,100,data,before
来源: https://blog.csdn.net/neoistheone/article/details/120659616