-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
-
PrintLayer.cppuseLOG(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::coutthe 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 FLAGSdefined 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?