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

Update metrics to support both numpy and torch tensor inputs #6

Open
tijyojwad opened this issue Sep 3, 2019 · 3 comments
Open

Update metrics to support both numpy and torch tensor inputs #6

tijyojwad opened this issue Sep 3, 2019 · 3 comments

Comments

@tijyojwad
Copy link
Contributor

Convert inputs and inputs to torch tensors or numpy arrays before the call function based on whether the function uses scikit learn or torch functions for metric calculation

@ntadimeti
Copy link
Collaborator

@tijyojwad Is this still relevant? could you comment on what/how this PR is going to help with? Also, relevant files that need to be looked at for this change, if it needs to be addressed.

@tijyojwad
Copy link
Contributor Author

This was intended for the metrics calculation classes. From what I recall there's a conditional in every metrics class that checks for whether or not the input array is numpy or a torch tensor. Python decorators are a neater way to do it so each of the classes can just call the decorator that does that check and conversion.

I think it's still relevant, but low priority.

@ntadimeti
Copy link
Collaborator

Gotcha! Makes sense.

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

No branches or pull requests

2 participants