MCPcopy Create free account
hub / github.com/294coder/Dif-PAN / func

Function func

utils/misc.py:47–48  ·  view source on GitHub ↗
(
        k, v)

Source from the content-addressed store, hash-verified

45def dict_to_str(d):
46 n = len(d)
47 def func(
48 k, v): return f"{k}: {v.item() if isinstance(v, torch.Tensor) else v}"
49 s = ""
50 for i, (k, v) in enumerate(d.items()):
51 s += func(k, v) + (", " if i < n - 1 else "")

Callers 1

dict_to_strFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected