diff --git a/include/caffe/blob.hpp b/include/caffe/blob.hpp index 2f59471c29e..5bdb00254f5 100644 --- a/include/caffe/blob.hpp +++ b/include/caffe/blob.hpp @@ -153,13 +153,13 @@ class Blob { inline int offset(const int n, const int c = 0, const int h = 0, const int w = 0) const { CHECK_GE(n, 0); - CHECK_LE(n, num()); + CHECK_LT(n, num()); CHECK_GE(channels(), 0); - CHECK_LE(c, channels()); + CHECK_LT(c, channels()); CHECK_GE(height(), 0); - CHECK_LE(h, height()); + CHECK_LT(h, height()); CHECK_GE(width(), 0); - CHECK_LE(w, width()); + CHECK_LT(w, width()); return ((n * channels() + c) * height() + h) * width() + w; } diff --git a/tools/extra/parse_log.py b/tools/extra/parse_log.py index 4248e2b87a3..ba7c1f33c5f 100755 --- a/tools/extra/parse_log.py +++ b/tools/extra/parse_log.py @@ -172,7 +172,7 @@ def write_csv(output_filename, dict_list, delimiter, verbose=False): dict_writer.writeheader() dict_writer.writerows(dict_list) if verbose: - print 'Wrote %s' % output_filename + print('Wrote %s' % output_filename) def parse_args():