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

regression: model execution failure #6945

Closed
vladmandic opened this issue Oct 14, 2022 · 4 comments · Fixed by #6978
Closed

regression: model execution failure #6945

vladmandic opened this issue Oct 14, 2022 · 4 comments · Fixed by #6978
Assignees
Labels
type:bug Something isn't working

Comments

@vladmandic
Copy link
Contributor

vladmandic commented Oct 14, 2022

PR #6904 Add resource initializer support
causes execution failure for some models that used to previously work without issues.

Issue is in https://github.com/tensorflow/tfjs/blame/master/tfjs-converter/src/executor/graph_model.ts#L361

Error:

error uncaughtException TypeError: Cannot read properties of undefined (reading 'img_inputs')
  at node_modules/@tensorflow/tfjs-converter/dist/tf-converter.node.js:30706:69
  at Array.reduce (<anonymous>)
  at GraphModel.normalizeInputs (node_modules/@tensorflow/tfjs-converter/dist/tf-converter.node.js:30705:32)
  at GraphModel.execute (node_modules/@tensorflow/tfjs-converter/dist/tf-converter.node.js:30777:23)
  at human.node-wasm.js:99:175230

cc @pyu10055 @ahmedsabie

@vladmandic vladmandic added the type:bug Something isn't working label Oct 14, 2022
@vladmandic
Copy link
Contributor Author

vladmandic commented Oct 19, 2022

@rthadur @ahmedsabie @pyu10055 any updates?
for me, this is a blocker for tfjs 4.0 and its not even triaged yet after 10 days.

@ahmedsabie
Copy link
Contributor

@vladmandic Do you have a model where the issue occurs?

@vladmandic
Copy link
Contributor Author

vladmandic commented Oct 25, 2022

@ahmedsabie here you go:

const tf = require('@tensorflow/tfjs-node'); // same issue using standard tfjs with wasm backend

async function main() {
  const model = await tf.loadGraphModel('https://vladmandic.github.io/human-models/models/mobilefacenet.json');
  const input = tf.randomUniform([1, model.inputs[0].shape[1], model.inputs[0].shape[2], 3], 0, 1, 'float32');
  const output = model.execute(input); // exception: TypeError: Cannot read properties of undefined (reading 'img_inputs')
}

main();

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants