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

is_label_valid in utils.py lacks support for integer targets #340

Open
nmonette opened this issue Jan 1, 2023 · 0 comments
Open

is_label_valid in utils.py lacks support for integer targets #340

nmonette opened this issue Jan 1, 2023 · 0 comments

Comments

@nmonette
Copy link

nmonette commented Jan 1, 2023

Hello. in function is_label_valid (line 76 of utils.py), the following code is given:

def is_label_valid(labels):
  """Returns a boolean `Tensor` for label validity."""
  labels = tf.convert_to_tensor(value=labels)
  return tf.greater_equal(labels, 0.)

The result of this is an error if the target is an integer, because 0. is a float, and tf.greater_equal expects a both arguments to be of the same type. This prevents support for targets/labels that are integers.

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

1 participant