Skip to content

Error in Visualization Code #7

Open
@pGit1

Description

@pGit1

See line 34: https://github.com/jacobgil/keras-cam/blob/master/cam.py

Shouldnt it be class_weights[1, :] instead of class_weights[:, 1]?

If this were a multiclass problem with 3 classes for instance my proposal would take the weight vector associated with that class. The way the code is now it would take the 2nd element in Class 0s weight vector, the 2nd element in Class 1's weight vector, and the 2nd element in Class 3's weight vector.

Am I missing something obvious? I looked at the class weight out put and confirmed that is what your current code is doing on line 34 which I cannot wrap my head around. I may be just confused about how CAM works.

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