Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Enhance tfjs2keras integration test #277

Merged
merged 10 commits into from
Aug 7, 2018

Conversation

caisq
Copy link
Contributor

@caisq caisq commented Jul 31, 2018

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 Reviewable

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
@caisq caisq changed the title Enhance tfjs2keras Enhance tfjs2keras integration test Jul 31, 2018
@caisq caisq changed the title Enhance tfjs2keras integration test [WIP; Do not review yet] Enhance tfjs2keras integration test Jul 31, 2018
@caisq caisq changed the title [WIP; Do not review yet] Enhance tfjs2keras integration test Enhance tfjs2keras integration test Aug 3, 2018
@caisq caisq requested review from nsthorat and dsmilkov August 3, 2018 18:24
Copy link
Member

@davidsoergel davidsoergel left a 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

Copy link
Member

@davidsoergel davidsoergel left a 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)

Copy link
Contributor Author

@caisq caisq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: 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.

@googlebot
Copy link

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.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@caisq
Copy link
Contributor Author

caisq commented Aug 7, 2018

@googlebot Ignore CLA issue. It is me with a different email address.

@caisq caisq merged commit 49f2306 into tensorflow:master Aug 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants