diff --git a/captum/concept/_core/tcav.py b/captum/concept/_core/tcav.py index daea9f939..ebb053bd2 100644 --- a/captum/concept/_core/tcav.py +++ b/captum/concept/_core/tcav.py @@ -694,7 +694,7 @@ def interpret( # Retrieves the lengths of the experimental sets so that we can sort # them by the length and compute TCAV scores in batches. exp_set_lens = np.array( - list(map(lambda exp_set: len(exp_set), experimental_sets)), dtype=object + [len(exp_set) for exp_set in experimental_sets], dtype=object ) exp_set_lens_arg_sort = np.argsort(exp_set_lens)