-
Notifications
You must be signed in to change notification settings - Fork 95
Conversation
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.
LGTM just some small comments and questions.
Reviewed 4 of 4 files at r1.
Reviewable status: 0 of 1 approvals obtained (waiting on @caisq, @davidsoergel, @ericdnielsen, and @bileschi)
src/models_test.ts, line 1148 at r1 (raw file):
Do we know why we're still getting style changes mixed in with our functional changes? Is there something we can do with our lint config?
src/models_test.ts, line 1210 at r1 (raw file):
useBias: false, kernelInitializer: 'ones',
not necessary to include the bias and initializer
src/models_test.ts, line 1217 at r1 (raw file):
// Do not call `await` below, so the two fit() calls may interleave.
Under what circumstances would this still complete before the next call?
src/models_test.ts, line 1243 at r1 (raw file):
useBias: false, kernelInitializer: 'ones'
bias and initializer configuration not necessary.
src/engine/training_test.ts, line 549 at r1 (raw file):
model.fit(inputs, targets, {batchSize: numSamples, epochs: 8});
This test will fail if the first model.fit completes before the second call. Is this at all likely to happen on some architectures? Can it be avoided?
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 @caisq, @davidsoergel, @ericdnielsen, and @bileschi)
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.
Thanks for the review, @bileschi !
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @caisq, @bileschi, @davidsoergel, and @ericdnielsen)
src/models_test.ts, line 1148 at r1 (raw file):
Previously, bileschi (Stanley Bileschi) wrote…
Do we know why we're still getting style changes mixed in with our functional changes? Is there something we can do with our lint config?
I think this has to do with different versions of clang-format being used...
src/models_test.ts, line 1210 at r1 (raw file):
Previously, bileschi (Stanley Bileschi) wrote…
useBias: false, kernelInitializer: 'ones',
not necessary to include the bias and initializer
True. Done.
src/models_test.ts, line 1217 at r1 (raw file):
Previously, bileschi (Stanley Bileschi) wrote…
// Do not call `await` below, so the two fit() calls may interleave.
Under what circumstances would this still complete before the next call?
If you call await
, the model.fit() call in the line below will complete before the following line.
If you don't call await
, it is still theoretically possible for this call to complete before the next call starts, but because the large number of epochs specified here, that is highly unlikely.
src/models_test.ts, line 1243 at r1 (raw file):
Previously, bileschi (Stanley Bileschi) wrote…
useBias: false, kernelInitializer: 'ones'
bias and initializer configuration not necessary.
Done.
src/engine/training_test.ts, line 549 at r1 (raw file):
Previously, bileschi (Stanley Bileschi) wrote…
model.fit(inputs, targets, {batchSize: numSamples, epochs: 8});
This test will fail if the first model.fit completes before the second call. Is this at all likely to happen on some architectures? Can it be avoided?
As I wrote in the response above, it is only possible if model.fit() completes really fast. But that is unlikely given the large number of epochs used here. I can't think of an alternative way to force the two model.fit() calls to interleave. JavaScript is not multi-threaded after all! I haven't seen this test fail after running it about a dozen times on different devices (including the ones on Travis).
Sounds good. Thanks for taking the time to think through and explain. I'm
happy that we aren't creating future flaky tests!
…On Mon, Aug 13, 2018 at 10:22 AM, Shanqing Cai ***@***.***> wrote:
***@***.**** commented on this pull request.
Thanks for the review, @bileschi <https://github.com/bileschi> !
*Reviewable
<https://reviewable.io/reviews/tensorflow/tfjs-layers/288#-:-LJnbLIw2O9wvY-AprPa:b-26ghv6>*
status: [image: ] complete! 1 of 1 approvals obtained (waiting on
@caisq <https://github.com/caisq>, @bileschi <https://github.com/bileschi>,
@davidsoergel <https://github.com/davidsoergel>, and @ericdnielsen
<https://github.com/ericdnielsen>)
------------------------------
*src/models_test.ts, line 1148 at r1
<https://reviewable.io/reviews/tensorflow/tfjs-layers/288#-LJnSEF_7FlYrCdkU8_8:-LJnbMxmEdGIu2MyKPGM:b-i6x012>
(raw file
<https://github.com/tensorflow/tfjs-layers/blob/1c720867d6f409988bdfd39a9da86eefa150c066/src/models_test.ts#L1148>):*
*Previously, bileschi (Stanley Bileschi) wrote…*
Do we know why we're still getting style changes mixed in with
our functional changes? Is there something we can do with our lint config?
I think this has to do with different versions of clang-format being
used...
------------------------------
*src/models_test.ts, line 1210 at r1
<https://reviewable.io/reviews/tensorflow/tfjs-layers/288#-LJnSeRo4lnyuOz5Yeay:-LJnbcsB2lHWrUWLBA5_:b-b5cz09>
(raw file
<https://github.com/tensorflow/tfjs-layers/blob/1c720867d6f409988bdfd39a9da86eefa150c066/src/models_test.ts#L1210>):*
*Previously, bileschi (Stanley Bileschi) wrote…*
useBias: false,
kernelInitializer: 'ones',
not necessary to include the bias and initializer
True. Done.
------------------------------
*src/models_test.ts, line 1217 at r1
<https://reviewable.io/reviews/tensorflow/tfjs-layers/288#-LJnSYYfEHbbVPmUXi3r:-LJnbrOw0aYuvOl-jEin:ba97msm>
(raw file
<https://github.com/tensorflow/tfjs-layers/blob/1c720867d6f409988bdfd39a9da86eefa150c066/src/models_test.ts#L1217>):*
*Previously, bileschi (Stanley Bileschi) wrote…*
// Do not call `await` below, so the two fit() calls may interleave.
Under what circumstances would this still complete before the next call?
If you call await, the model.fit() call in the line below will complete
before the following line.
If you don't call await, it is still theoretically possible for this call
to complete before the next call starts, but because the large number of
epochs specified here, that is highly unlikely.
------------------------------
*src/models_test.ts, line 1243 at r1
<https://reviewable.io/reviews/tensorflow/tfjs-layers/288#-LJnSr9RAOiT6QsTZEJK:-LJncCDHAWbilVFNFRtL:b-896fix>
(raw file
<https://github.com/tensorflow/tfjs-layers/blob/1c720867d6f409988bdfd39a9da86eefa150c066/src/models_test.ts#L1243>):*
*Previously, bileschi (Stanley Bileschi) wrote…*
useBias: false, kernelInitializer: 'ones'
bias and initializer configuration not necessary.
Done.
------------------------------
*src/engine/training_test.ts, line 549 at r1
<https://reviewable.io/reviews/tensorflow/tfjs-layers/288#-LJnRVjZ9dIA6aV2qV64:-LJndW1T8F6YkT6Po8cH:b-a0nbxn>
(raw file
<https://github.com/tensorflow/tfjs-layers/blob/1c720867d6f409988bdfd39a9da86eefa150c066/src/engine/training_test.ts#L549>):*
*Previously, bileschi (Stanley Bileschi) wrote…*
model.fit(inputs, targets, {batchSize: numSamples, epochs: 8});
This test will fail if the first model.fit completes before the second
call. Is this at all likely to happen on some architectures? Can it be
avoided?
As I wrote in the response above, it is only possible if model.fit()
completes really fast. But that is unlikely given the large number of
epochs used here. I can't think of an alternative way to force the two
model.fit() calls to interleave. JavaScript is not multi-threaded after
all! I haven't seen this test fail after running it about a dozen times on
different devices (including the ones on Travis).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#288 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAhZTlw886wcaC7HM3J8IQASk3gA0Osbks5uQYusgaJpZM4V5BQ6>
.
--
Stan Bileschi Ph.D. | SWE | bileschi@google.com | 617-230-8081
|
FEATURE
will immediately be thrown.
stopTraining = true
work from not only class objects,but also non-class object function callbacks.
Also:
Fixes: tensorflow/tfjs#558
This change is