Sarkars/batchnorm update - #318
#318Sarkars/batchnorm update#318sayantan-nervana wants to merge 4 commits intomasterNervanaSystems/ngraph-tf:masterfrom sarkars/batchnorm_updateNervanaSystems/ngraph-tf:sarkars/batchnorm_updateCopy head branch name to clipboard
Conversation
sayantan-nervana
left a comment
There was a problem hiding this comment.
Future-proofing for this change: NervanaSystems/ngraph#2046
|
|
||
| // FusedBatchNorm : Forward pass, training = true | ||
| // TODO fix this test | ||
| TEST(NNOps, DISABLED_FusedBatchNormNHWCTrainTrue) { |
There was a problem hiding this comment.
This test does not pass. Sample output:
[ RUN ] NNOps.DISABLE_FusedBatchNormNHWCTrainTrue
2018-11-19 01:03:39.177831: I tensorflow/core/common_runtime/process_util.cc:69] Creating new thread pool wit
h default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.
/localdisk/sarkars/workspace1/tf_ngtf_7_mkl_1_12/ngraph-tf/test/test_utilities.h:126: Failure
Value of: rt
Actual: false
Expected: true
TF output 20.955995559692383
NG output 20.606725692749023
/localdisk/sarkars/workspace1/tf_ngtf_7_mkl_1_12/ngraph-tf/test/test_utilities.h:126: Failure
Value of: rt
Actual: false
Expected: true
TF output 21.971120834350586
NG output 21.604936599731445
[ FAILED ] NNOps.DISABLE_FusedBatchNormNHWCTrainTrue (125 ms)
| ng_y = make_shared<ng::op::GetOutputElement>(ng_batch_norm, 0); | ||
| ng_mean = make_shared<ng::op::GetOutputElement>(ng_batch_norm, 1); | ||
| ng_variance = make_shared<ng::op::GetOutputElement>(ng_batch_norm, 2); | ||
| shared_ptr<ngraph::Node> ng_y_out, ng_mean_out, ng_variance_out; |
There was a problem hiding this comment.
I must misunderstand about the training op orders. In ngraph, shouldn't the output order be {gamma, beta, input}? Could you please explain this a little bit?
There was a problem hiding this comment.
So this PR was to sync with this PR in ngraph, which reorders batch norm: NervanaSystems/ngraph#2046 (comment)
But apparently that has been closed, and will come later, so I suppose we don't have to do anything now.
|
TESTNOW |
1 similar comment
|
TESTNOW |
|
Fail message: |
|
One more comment: in ngraph core, it requires the input dimension >=2. I think it might be good if we add this as a confirmation constraint. |
Opening a PR for future ngraph BN API change: https://github.com/NervanaSystems/ngraph/pull/2046/files