You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PrintLayer.cpp use LOG(INFO) to print a layer's output matrix and sequence information (if the output is a sequence).
Float values in a layer's output matrix are first formatted into an ostringstream. Because a layer's output may contain many float numbers (batch size × layer's size, for example, 128 × 128), as a result, the formatted string is always very long.
I found when using LOG(INFO) to print such a long formatted string, the string is truncated. (I change LOG(INFO) into std::cout the string can be printed correctly)
It seems that the LOG(INFO) macro has a buffer to cache the logging information, and its size is not large enough in my case.
I searched and tried GLOG FLAGS defined in glog, but still, do not success to explicitly change the buffer size of LOG(INFO) to print the entire information.
Maybe, we should print such a long string part by part?
I am not sure is the problem caused by this limitation? If so, it seems that this limitation cannot be modified by pre-defined FLAGS?
The text was updated successfully, but these errors were encountered:
lcy-seso
changed the title
when a very long iog message is printed by LOG(INFO), it will be truncated.
when a very long log message is printed by LOG(INFO), it will be truncated.
Sep 1, 2017
PrintLayer.cpp
useLOG(INFO)
to print a layer's output matrix and sequence information (if the output is a sequence).Float values in a layer's output matrix are first formatted into an
ostringstream
. Because a layer's output may contain many float numbers (batch size × layer's size, for example, 128 × 128), as a result, the formatted string is always very long.I found when using LOG(INFO) to print such a long formatted string, the string is truncated. (I change
LOG(INFO)
intostd::cout
the string can be printed correctly)It seems that the
LOG(INFO)
macro has a buffer to cache the logging information, and its size is not large enough in my case.I searched and tried
GLOG FLAGS
defined in glog, but still, do not success to explicitly change the buffer size of LOG(INFO) to print the entire information.Maybe, we should print such a long string part by part?
I searched the codes and found this line: https://github.com/google/glog/blob/a835da8e088273066c32c3cb0e8ff69d54071217/src/logging.cc#L330
I am not sure is the problem caused by this limitation? If so, it seems that this limitation cannot be modified by pre-defined FLAGS?
The text was updated successfully, but these errors were encountered: