Skip to content

Bug: remaining filter equal to 1 #4

@lizhenstat

Description

@lizhenstat

Hi, I find a bug in hinge_densenet_svd.py inthis line

loss_proj.append(torch.sum(torch.sum(projection.squeeze().t() ** 2, dim=1) ** (q / 2)) ** (1 / q))

When the remaining filter number equals one, it will give the following error.
The code should be changed to the following to squeeze the last two dimensions

loss_proj.append(torch.sum(torch.sum(projection.squeeze(3).squeeze(2).t() ** 2, dim=1) ** (q / 2)) ** (1 / q))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions