-
Notifications
You must be signed in to change notification settings - Fork 95
Conversation
Previously only the loading of model topology was tested. This PR adds the test for the loading of weight values. In addition, this PR lets each model run its predict() method using some randomly generated data. The input data and the prediction() outputs are saved to disk from TensorFlow.js. On the Python side, the input tensors are loaded and used to invoke the loaded models. The (near) equality of the outputs from Python and from those from TensorFlow.js is asserted on for each model. DEV
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 approvals obtained (waiting on @caisq, @nsthorat, and @dsmilkov)
integration_tests/tfjs2keras/tfjs_save.ts, line 18 at r1 (raw file):
/** * Generate random input(s) get predict() output(s) and save them, along with
Nit: commas and wording, e.g. "Generate random input(s), get predict() output(s), and save both along with the model"
integration_tests/tfjs2keras/tfjs_save.ts, line 42 at r1 (raw file):
if (inputShape.indexOf(null) !== -1) { throw new Error( `It is assume that the only the first dimension of the tensor ` +
nit: assumed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r1.
Reviewable status: 0 of 1 approvals obtained (waiting on @caisq, @nsthorat, and @dsmilkov)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @nsthorat and @dsmilkov)
integration_tests/tfjs2keras/tfjs_save.ts, line 18 at r1 (raw file):
Previously, davidsoergel (David Soergel) wrote…
Nit: commas and wording, e.g. "Generate random input(s), get predict() output(s), and save both along with the model"
Done.
integration_tests/tfjs2keras/tfjs_save.ts, line 42 at r1 (raw file):
Previously, davidsoergel (David Soergel) wrote…
nit: assumed
Done.
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
5a0ad65
to
cc975a8
Compare
@googlebot Ignore CLA issue. It is me with a different email address. |
Enhance tfjs2keras integration test
Previously only the loading of model topology was tested.
This PR adds the test for the loading of weight values. In addition,
this PR lets each model run its predict() method using some
randomly generated data. The input data and the prediction() outputs
are saved to disk from TensorFlow.js. On the Python side, the
input tensors are loaded and used to invoke the loaded models.
The (near) equality of the outputs from Python and from those from
TensorFlow.js is asserted on for each model.
DEV
This change is