We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I found what it seems to be a bug:
I have
from torchmetrics import MeanSquaredError, R2Score def test_step(self, batch, batch_idx): batch = batch.to(torch.float32) pooled_output = batch[ :, :-1 ].float() # All columns except the last targets = batch[:, -1].float() predictions = self(pooled_output).squeeze(-1) score_r2 = self.test_r2(predictions, targets) # Compute R2 self.log("test_r2", score_r2, on_epoch=True) return score_r2
but the test r2 score this step gives differs from what I retrieve directly from predictions and actual values.
To clarify, the r2 score in results = trainer.test(regressor_model, test_dataloader) is different from what I get from
results = trainer.test(regressor_model, test_dataloader)
predictions = trainer.predict(regressor_model, test_dataloader) torchmetrics.R2Score()(predictions, error)
Also, torchmetrics and sklearn r2 functions match in the latter task. How come? Thanks a lot.
Info:
The text was updated successfully, but these errors were encountered:
Hi! thanks for your contribution!, great first issue!
Sorry, something went wrong.
No branches or pull requests
Hi, I found what it seems to be a bug:
I have
but the test r2 score this step gives differs from what I retrieve directly from predictions and actual values.
To clarify, the r2 score in
results = trainer.test(regressor_model, test_dataloader)
is different from what I get fromAlso, torchmetrics and sklearn r2 functions match in the latter task. How come? Thanks a lot.
Info:
The text was updated successfully, but these errors were encountered: