Skip to content

Comments

Shape mismatch CHECK logging improvements#5545

Merged
Noiredd merged 1 commit intoBVLC:masterfrom
brunobowden:shape_mismatch_checks
Feb 2, 2018
Merged

Shape mismatch CHECK logging improvements#5545
Noiredd merged 1 commit intoBVLC:masterfrom
brunobowden:shape_mismatch_checks

Conversation

@brunobowden
Copy link
Contributor

@brunobowden brunobowden commented Apr 17, 2017

  • More logs when shapes mismatch
  • Manually reviewed all matches of “grep -r CHECK.*shape src”
  • Follow JUnit convention of:
  CHECK(expected == actual)
      << “expected: “ << expected
      << “ vs. actual: ” << actual;

Layers:

  • Recurrent
  • BaseConvolutionLayer
  • Slice (improves logging for incorrect parameter)

CHECK_EQ

@brunobowden brunobowden force-pushed the shape_mismatch_checks branch 2 times, most recently from a0a0f0a to b3c5f9d Compare April 18, 2017 01:07
@brunobowden brunobowden force-pushed the shape_mismatch_checks branch from b3c5f9d to 7b5ad4a Compare April 18, 2017 02:19
@brunobowden
Copy link
Contributor Author

Seeing flaky build failures in test_backward_start_end, logged as issue #5546. The cause is rather a mystery but might be connected to this PR.

- More logs when shapes mismatch
- Manual reviewed all matches of “grep -r CHECK.*shape src”
- Follow JUnit convention of:
```
  CHECK(expected == actual)
      << “expected: “ << expected
      << “ vs. actual: ” << actual;
```

Layers:
- Recurrent
- BaseConvolutionLayer
- Slice (improves logging for incorrect parameter)

CHECK_EQ
- Would prefer to use CHECK_EQ(expected, actual):
https://github.com/google/glog/blob/master/src/glog/stl_logging.h.in#L36
- However this requires include of stl_logging.h which introduces a
build warning. I believe this would work if caffe was updated to the
latest version of glog but that's a bigger change.
@Noiredd
Copy link
Member

Noiredd commented Feb 2, 2018

Merging. Thank you for the definite improvement!
Could be interesting to see how many CHECKs across the framework go without any verbose output whatsoever.

Also, the randomly failing build has been solved in #5973.

@Noiredd Noiredd merged commit d2627e9 into BVLC:master Feb 2, 2018
XinYao1994 pushed a commit to XinYao1994/caffe that referenced this pull request Aug 29, 2018
Shape mismatch CHECK logging improvements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants