Closed Rayoll closed 2 years ago
Thanks a lot, it really help. Could you please tell me what does database.txt do in training the network :)
训练的时候只用了:train_loader test_loader, dataset_loader 在算mAP的时候用的:
tst_binary, tst_label = compute_result(test_loader, net, device=device)
# print("calculating dataset binary code.......")\
trn_binary, trn_label = compute_result(dataset_loader, net, device=device)
# print("calculating map.......")
mAP = CalcTopMap(trn_binary.numpy(), tst_binary.numpy(), trn_label.numpy(), tst_label.numpy(),
config["topK"])
hi, thank you very much for your work, the database.txt test.txt and train.txt of cifar10 in data is not given
hi, thank you very much for your work, the database.txt test.txt and train.txt of cifar10 in data is not given
You can get the cifar10 dataset by import torchvision.datasets
, and then directly divide it in multiple ways. You can refer to the code, of course, You can also generate these files yourself.
If I have an image classification dataset, how could I get the onehot label of each image for retrieval?