Skip to content

A bug in computing val_acc #4

@SamitHuang

Description

@SamitHuang

val_acc is always zeros since "correct" is a tensor with int type. You should "correct" into a float type before computing "correct / len(test_loader.dataset)".

For example,
add this in line 127 in capsulenet.py : correct = correct.numpy().astype(float)

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