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
Hi Frederick,
Thanks for your colab notebook implementation. I am trying to understand the calculation of TracIN score in the notebook "resnet50_imagenet_proponents_opponents" where you calculate 3 scores in the loss function as shown below
def find(loss_grad=None, activation=None, topk=50):
if loss_grad is None and activation is None:
raise ValueError('loss grad and activation cannot both be None.')
scores = []
scores_lg = []
scores_a = []
for i in range(len(trackin_train['image_ids'])):
if loss_grad is not None and activation is not None:
lg_sim = np.sum(trackin_train['loss_grads'][i] * loss_grad)
a_sim = np.sum(trackin_train['activations'][i] * activation)
scores.append(lg_sim * a_sim)
scores_lg.append(lg_sim)
scores_a.append(a_sim)
Here you calculate lg_sim, a_sim, and scores and mention them as error_similarity, encoding similarity and influence when you display proponents and opponents for a particular test image.
lg_sim calculation is similar to the formula for calculating TracIN mentioned in the paper. so is the lg_sim score is equivalent to TracIN scores for differentiating proponents and opponents? Is my understanding correct? If so what are the significance of a_sim and scores parameters?
Thanks in Advance
The text was updated successfully, but these errors were encountered:
Hi Frederick,
Thanks for your colab notebook implementation. I am trying to understand the calculation of TracIN score in the notebook "resnet50_imagenet_proponents_opponents" where you calculate 3 scores in the loss function as shown below
Here you calculate lg_sim, a_sim, and scores and mention them as error_similarity, encoding similarity and influence when you display proponents and opponents for a particular test image.
lg_sim calculation is similar to the formula for calculating TracIN mentioned in the paper. so is the lg_sim score is equivalent to TracIN scores for differentiating proponents and opponents? Is my understanding correct? If so what are the significance of a_sim and scores parameters?
Thanks in Advance
The text was updated successfully, but these errors were encountered: