Quiz on Miscellaneous Methods

Quiz yourself on the concepts learned in this chapter.

1

Which explanation is computed by these lines of code?

    saliency = torch.zeros((1,1, MASK_SIZE, MASK_SIZE))
    mask_sum = torch.zeros((1,1, MASK_SIZE, MASK_SIZE))
    for i in range(NUM_MASKS):
        logits = model(mask*image.unsqueeze(0))
        prob = logits.detach().softmax(-1)[0, prediction]
        saliency[0,0] += mask[0, 0]*prob
        mask_sum[0,0] += mask[0,0]

    saliency = saliency/mask_sum
A)

Counterfactual explanation

B)

Prototypical explanation

C)

Concept explanation

D)

Perturbation-based explanation

Question 1 of 50 attempted

Get hands-on with 1200+ tech skills courses.