Open Pensarfeo opened 8 months ago
Hi, @Pensarfeo
I apologize for the delayed response and I see currently you're using --use_structured_outputs_names
(Changes output of graph model to match the structured_outputs format instead of list format. Defaults to False.) option in tfjs-converter
command which is recommended approach.
In Python code I believe you've assigned meaningful names to your model's outputs heads, I would suggest you verify output heads names once by printing the model summary with the help of model.summary()
and during conversion include --use_structured_outputs_names=True
in your conversion command with this setup, the converted TFJs model will have named outputs that match the names you assigned in Python. You can then access them by name something like below :
const outputTfJs = await model.executeAsync(colorCenterPatchersNorm);
const semanticOutput = outputTfJs['semantic'];
const dxdywhOutput = outputTfJs['dxdywh'];
If possible could you please help us with your complete code-snippet or Github repo along with your model and complete steps to replicate the same behavior from our end to investigate this issue further from our end ?
Thank you for your understanding and patience.
@gaikwadrahul8
Thanks for your answer! I'm not currently working on the model right now, so ill se what I can provide you once I am back to work on it.
Thanks again and thanks for building this amazing tool :)
Hi, @Pensarfeo
You're welcome! Feel free to reach out whenever you're back to working on the model and we'll do our best to help further. In the meantime, Thank you so much for the kind words about the tool!
To confirm, would you like to close this issue for now and create a new one when you're ready to resume working on the model ?
Thank you for your understanding and patience.
@gaikwadrahul8 I think its better to keep it open to avoid having too many repeated issues. but also keeping it open or closed probably matters more to you so feel free to close it if it helps you better manage the issues in this repo 😉.
Cheers
Hello everyone, whenever I covert my model to tfjs the order of the output heads keeps changing, which means I need to check every time which one is correct and which one is not. I just have not been able to figure out how to fix that, I am not super sure if this is a bug or a feature, but it would seem a very unintuitive behavior.
This is the code I use to convert from python to tfjs
Then I execute the network in the usual way
the order of the outputs keeps changing