MCPcopy Index your code
hub / github.com/pytorch/tutorials / print_inputs

Function print_inputs

intermediate_source/memory_format_tutorial.py:315–323  ·  view source on GitHub ↗
(args, indent="")

Source from the content-addressed store, hash-verified

313
314
315def print_inputs(args, indent=""):
316 for t in args:
317 if isinstance(t, torch.Tensor):
318 print(indent, t.stride(), t.shape, t.device, t.dtype)
319 elif isinstance(t, list) or isinstance(t, tuple):
320 print(indent, type(t))
321 print_inputs(list(t), indent=indent + " ")
322 else:
323 print(indent, t)
324
325
326def check_wrapper(fn):

Callers 1

check_clFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected