Skip to content
New issue

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

Adding _check_inputs() for error calculation functions #279

Merged
merged 3 commits into from
Dec 21, 2023

Conversation

WenjieDu
Copy link
Owner

What does this PR do?

Adding a unified func _check_inputs() to help check inputs' values and shapes for error calculation functions.

Before submitting

  • This PR is made to fix a typo or improve the docs (you can dismiss the other checks if this is the case).
  • Was this discussed/approved via a GitHub issue? Please add a link to it if that's the case.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have written necessary tests and already run them locally.

…during torch training will raise error...

RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.
@WenjieDu WenjieDu merged commit 9c5c380 into dev Dec 21, 2023
9 of 23 checks passed
@WenjieDu WenjieDu deleted the add_check_inputs branch December 21, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant