moules.linear_evaluation is missing parameters when calling Accuracy and AveragePrecision
fducau opened this issue · comments
Felipe Ducau commented
When running the LinearEvaluation
module I get the following error:
TypeError: Accuracy.__new__() missing 1 required positional argument: 'task'
and similar when calling torchmetrics.AveragePrecision
without the task
argument
Proposed solution
self.accuracy = torchmetrics.Accuracy(
task="multilabel",
num_labels=output_dim
)
self.average_precision = torchmetrics.AveragePrecision(
task='multilabel',
num_labels=output_dim,
pos_label=1
)