-
Notifications
You must be signed in to change notification settings - Fork 96
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
sleap-export can't not unrag #1512
Comments
Hi @jkbhagatio, So to be clear: you want the outputs as ragged tensors so you can deal with having variable number of instances yourself? How are you checking whether the outputs are ragged? Typically TensorFlow will return concrete tensors if everything in the batch is the same size and doesn't need to be ragged, so you may need an example batch that has variable length for you to see those. Alternatively, even with unragging, you can simply discard instances that are all I can't see where the issue could be happening though... Here's where we parse the CLI flag. And here's where we do the model export -- note the logic for unragging: full_model = tf.function(
lambda x: sleap.nn.data.utils.unrag_example(model(x), numpy=False)
if unrag_outputs
else model(x)
) Let us know how you're running the exported model and what kinds of messages you're seeing there! Cheers, Talmo |
Hey @talmo, I actually wanted to play with using a ragged tensor output in Bonsai, but this would be nice also.
I noticed that in the output of Let me know if you think I'm doing something silly, or what else I can try to help debug this! |
Hi @jkbhagatio, You are totally correct, there was some illogical logic here. We were using a different action for the Seeing as Thanks., |
When trying to use
--unrag False
withsleap-export
, the output is still an unragged export. Using SLEAP v 1.3.1The text was updated successfully, but these errors were encountered: