You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, I found that pred_tr is indeed (2708, 7) but the value inside is positive or negative. I used the following code to output the updated label with open("./embeddings_target.txt", "w") as fe, open("./labels_target.txt", 'w') as fl: for i in range(len(pred_tr)): fl.write(label_dict[int(list(pred_tr[i]).index(1.))]+ "\n") fe.write(" ".join(map(str, pred_tr[i])) + "\n")
the error occurs: ValueError: 1.0 is not in list
I just want to ask, the probability of each node for the 7 categories has positive and negative numbers. What should I do?
The text was updated successfully, but these errors were encountered:
Hello, I recently wanted to output the updated labels, so I added a pred_tr in the training phase:
_, loss_value_tr, acc_tr,pred_tr = sess.run([train_op, loss, accuracy,log_resh]
Then, I found that pred_tr is indeed (2708, 7) but the value inside is positive or negative. I used the following code to output the updated label
with open("./embeddings_target.txt", "w") as fe, open("./labels_target.txt", 'w') as fl: for i in range(len(pred_tr)): fl.write(label_dict[int(list(pred_tr[i]).index(1.))]+ "\n") fe.write(" ".join(map(str, pred_tr[i])) + "\n")
the error occurs: ValueError: 1.0 is not in list
I just want to ask, the probability of each node for the 7 categories has positive and negative numbers. What should I do?
The text was updated successfully, but these errors were encountered: