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

map_labels fails for n_classes > 1 #315

Open
hvgazula opened this issue Apr 2, 2024 · 1 comment
Open

map_labels fails for n_classes > 1 #315

hvgazula opened this issue Apr 2, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@hvgazula
Copy link
Contributor

hvgazula commented Apr 2, 2024

    File "/net/vast-storage/scratch/vast/gablab/hgazula/nobrainer/nobrainer/dataset.py", line 338, in None  *
        lambda x, y: (x, tf.one_hot(y, self.n_classes))

    TypeError: Value passed to parameter 'indices' has DataType float32 not in list of allowed values: uint8, int8, int32, int64

Solution: cast y into one of the int types and the rest should flow.

TODO: check the same with n_classes = 2

@hvgazula hvgazula self-assigned this Apr 2, 2024
@hvgazula hvgazula added the bug label Apr 2, 2024
@hvgazula hvgazula added this to the 1.2.1 milestone Apr 2, 2024
@hvgazula
Copy link
Contributor Author

hvgazula commented Apr 2, 2024

tf.cast is the way to go but it will render the casting in binarize redundant. Need to clean this up a bit.

hvgazula added a commit that referenced this issue Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant