Skip to content

Discrepancy in the Order of Returned Variables from baseline_test Function #6

@kennishida17

Description

@kennishida17

Discrepancy in the Order of Returned Variables from baseline_test Function

Firstly, I apologize if my explanation is unclear as I'm not very experienced with using GitHub.

I noticed a small discrepancy in the return order of the variables from a function.

The function returns the values in the following order:

https://github.com/kennishida17/Learning-with-Holographic-Reduced-Representations/blob/ce3cb8fc4c63b16f41fc41d8788503ebe146c73c/lib/model.py#L175C1-L177C51

else:
        return total_loss/num_itr, total_f1/num_itr, total_pr/num_itr, total_rec/num_itr

However, when receiving the output of the function, it's assumed to be in this order:

https://github.com/kennishida17/Learning-with-Holographic-Reduced-Representations/blob/ce3cb8fc4c63b16f41fc41d8788503ebe146c73c/run_classifier.py#L222

val_loss, pr, rec, f1 = baseline_test(model, device, val_loader)

Proposed Change

I suggest adjusting the return order in the baseline_test function to match the order when receiving the output. The correct order should be:

return total_loss/num_itr, total_pr/num_itr, total_rec/num_itr, total_f1/num_itr

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