Hi,

In a batch of 128 I have extracted the features and then found the mean, and angles between mean and corresponding class features, The dimensions of calculated angles are:

[8,2,128], …[5,2,128] where the first index shows the total number of a certain class, say, 8 classes.

Can anyone help to find the mean of the angles of these dimensions?

Can you clarify more, what you want?

Thanks Kushaj for ur reply,

I want to find the mean of angles of different classes. To make it simple, assume that we have angles of different classes stored in in 3D tensors I.e. (10, 2,128), (13,2, 128) …etc. where 1st dimension represents the number of certain classes. 2, 128 is the dimension of angles. Now I want to iterate over all these angles to find the mean of angles.

Cheers,

Angelina

For the tensor (10,2,128), `torch.mean(tensor, dim=(1,2))`

would give you the mean along the dim 0. Is this what you are referring to?