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
I would like to load the side information and associate it with the correct sample in Tensorflow. What order do the side_info_cifar10N.csv and side_info_cifar100N.csv follow, the one of the PyTorch or the Tensorflow files?
And if they don't come in the Tensorflow order, should I load them like this?
importnumpyasnpimportpandasaspdnoise_file=np.load('./data/CIFAR-10_human_ordered.npy', allow_pickle=True)
random_label1=noise_file.item().get('random_label1')
train_ds, test_ds=tfds.load('cifar10', split=['train','test'], as_supervised=True, batch_size=-1)
train_images, train_labels=tfds.as_numpy(train_ds)
side_info_df=pd.read_csv('side_info_cifar10N.csv')
worker1_id=df['Worker1-id'].to_numpy()
# Reorder side information with correct orderimage_order=np.load('image_order_c10.npy')
worker1_id_ordered=worker1_id[image_order//10]
# Now, the indexing of all arrays matches correctlyfirst_example= (train_images[0], train_labels[0], worker1_id_ordered[0])
Thank you very much!
The text was updated successfully, but these errors were encountered:
Thanks for your concerns. To clarify:
(1) The order of side information matches with the PyTorch version;
(2) For the side information, we did not provide per-sample information. And the provided information is w.r.t. 10 images (a small batch), rather than a single image. The reason is that we wish each worker could contribute not too few on the annotations, i.e., at least annotating 10 images.
(3) Suggested solution for making use of the side information is to load the image_order_c10.npy file and obtain the index mapping between PyTorch and Tensorflow versions. Your solution seems to be reasonable to me!
Hi,
I would like to load the side information and associate it with the correct sample in Tensorflow. What order do the
side_info_cifar10N.csv
andside_info_cifar100N.csv
follow, the one of the PyTorch or the Tensorflow files?And if they don't come in the Tensorflow order, should I load them like this?
Thank you very much!
The text was updated successfully, but these errors were encountered: