MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / _tensor_str

Function _tensor_str

python/oneflow/framework/tensor_str.py:270–277  ·  view source on GitHub ↗
(self, indent)

Source from the content-addressed store, hash-verified

268
269
270def _tensor_str(self, indent):
271 summarize = self.numel() > PRINT_OPTS.threshold
272 if self.dtype is flow.float16:
273 self = self.float()
274
275 with flow.no_grad():
276 formatter = _Formatter(get_summarized_data(self) if summarize else self)
277 return _tensor_str_with_formatter(self, indent, summarize, formatter)
278
279
280def _add_suffixes(tensor_str, suffixes, indent):

Callers 1

_gen_tensor_str_templateFunction · 0.85

Calls 4

_FormatterClass · 0.85
get_summarized_dataFunction · 0.85
floatMethod · 0.45

Tested by

no test coverage detected