MCPcopy Create free account
hub / github.com/M2219/ESMStereo / tensor2numpy

Function tensor2numpy

utils/experiment.py:50–56  ·  view source on GitHub ↗
(vars)

Source from the content-addressed store, hash-verified

48
49@make_iterative_func
50def tensor2numpy(vars):
51 if isinstance(vars, np.ndarray):
52 return vars
53 elif isinstance(vars, torch.Tensor):
54 return vars.data.cpu().numpy()
55 else:
56 raise NotImplementedError("invalid input type for tensor2numpy")
57
58
59@make_iterative_func

Callers 3

testFunction · 0.85
testFunction · 0.85
save_imagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected