Skip to content

Calculation of mean for centering the features #1

@pradipto111

Description

@pradipto111

According to the given implementation in classification_tasks/utils_eval.py, the features phi is being centered as follows -
Line 502 phi = phi - torch.mean(phi, axis=1, keepdims=True).

However, assuming phi has a dimension (D, f) where D is the dataset size, and f is the feature size. The mean on axis 1 turns out to have the dimension (D,1). But in my opinion, we want the mean feature to have the dimension of (1,f), hence the mean should be applied across the dataset i.e. axis=0.

Kindly look into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions