MCPcopy Create free account
hub / github.com/davisking/dlib / tensor_to_str

Function tensor_to_str

dlib/dnn/core.h:227–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225 };
226
227 inline std::string tensor_to_str (
228 const tensor& t,
229 int& min_length
230 )
231 {
232 if (t.size() == 0)
233 return "";
234
235 std::ostringstream sout;
236 sout << "output size=(num:"<< t.num_samples() << ", ";
237 sout << "k:" << t.k() << ",";
238 while (sout.tellp() < 28) sout << " ";
239 sout << "nr:" << t.nr() << ",";
240 while (sout.tellp() < 28+8) sout << " ";
241 sout << "nc:" << t.nc() << ")";
242 while (sout.tellp() < min_length) sout << " ";
243 min_length = sout.tellp();
244 sout << "\t";
245 return sout.str();
246 }
247 }
248
249// ----------------------------------------------------------------------------------------

Callers 5

printMethod · 0.85
printMethod · 0.85
printMethod · 0.85
printMethod · 0.85
printMethod · 0.85

Calls 6

sizeMethod · 0.45
num_samplesMethod · 0.45
kMethod · 0.45
nrMethod · 0.45
ncMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected