Hi ptrblck,
Could you plz guide how to get the size of mean tensors from your code (given below)
class_features_mean = {idx: [] for idx in range(nb_classes)}
for class_index in range(nb_classes):
tmp = torch.stack(class_features[class_index])
class_features_mean[class_index] = tmp.mean(dim=0)
print(class_features_mean)
print(‘class_features_mean…’,class_features_mean.shape)
#> {0: tensor([-0.8606, -0.1773,  0.0448,  0.6243]), 1: tensor([-1.0357, -0.2026,  1.2145,  0.2696]
It generates the following error