TorchSnooper v0.3
Containers are now represented recursively.
Example code:
import torch
import torchsnooper
@torchsnooper.snoop()
def f():
return [{'key': torch.zeros(5, 6, 7)}]
f()
Output from TorchSnooper v0.2
14:17:49.646680 call 5 def f():
14:17:49.646778 line 6 return [{'key': torch.zeros(5, 6, 7)}]
14:17:49.646973 return 6 return [{'key': torch.zeros(5, 6, 7)}]
Return value:.. [{'key': tensor([[[0., 0., 0., 0., 0., 0., 0.], ...., 0.], [0., 0., 0., 0., 0., 0., 0.]]])}]
Output from TorchSnooper v0.3
14:16:33.205156 call 5 def f():
14:16:33.205261 line 6 return [{'key': torch.zeros(5, 6, 7)}]
14:16:33.205427 return 6 return [{'key': torch.zeros(5, 6, 7)}]
Return value:.. [{'key': tensor<(5, 6, 7), float32, cpu>}]