Skip to content

Instantly share code, notes, and snippets.

@suriyadeepan
Last active July 7, 2019 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suriyadeepan/8cec26875ec007a84ce60d44f119c045 to your computer and use it in GitHub Desktop.
Save suriyadeepan/8cec26875ec007a84ce60d44f119c045 to your computer and use it in GitHub Desktop.
Anatomy of PPl
{'b': {'args': (),
'fn': Normal(loc: 0.0, scale: 1.0),
'name': 'b',
'type': 'sample',
'value': tensor(-1.1897, grad_fn=<AddBackward0>)},
'b_loc': {'args': (tensor(0.), Real()),
'fn': <function param.<locals>.fn at 0x127388950>,
'name': 'b_loc',
'type': 'param',
'value': tensor(0., requires_grad=True)},
'b_scale': {'args': (tensor(1.), GreaterThan(lower_bound=0.0)),
'fn': <function param.<locals>.fn at 0x1273889d8>,
'name': 'b_scale',
'type': 'param',
'value': tensor(1., grad_fn=<AddBackward0>)},
'w': {'args': (),
'fn': Normal(loc: 1.0, scale: 1.0),
'name': 'w',
'type': 'sample',
'value': tensor(-0.4318, grad_fn=<AddBackward0>)},
'w_loc': {'args': (tensor(1.), Real()),
'fn': <function param.<locals>.fn at 0x127388840>,
'name': 'w_loc',
'type': 'param',
'value': tensor(1., requires_grad=True)},
'w_scale': {'args': (tensor(1.), GreaterThan(lower_bound=0.0)),
'fn': <function param.<locals>.fn at 0x1273888c8>,
'name': 'w_scale',
'type': 'param',
'value': tensor(1., grad_fn=<AddBackward0>)}}
{'b': {'args': (),
'fn': Normal(loc: 0.5, scale: 1.0),
'name': 'b',
'type': 'sample',
'value': tensor(0.5519)},
'obs': {'args': (),
'fn': Normal(loc: torch.Size([2]), scale: torch.Size([2])),
'name': 'obs',
'type': 'sample',
'value': tensor([0.9150, 1.3150])},
'w': {'args': (),
'fn': Normal(loc: 0.0, scale: 1.0),
'name': 'w',
'type': 'sample',
'value': tensor(1.3068)}}
{'b': {'args': (),
'fn': Normal(loc: 0.0, scale: 1.0),
'name': 'b',
'type': 'sample',
'value': tensor(-2.0570, grad_fn=<AddBackward0>)},
'b_loc': {'args': (tensor(0.), Real()),
'fn': <function param.<locals>.fn at 0x11f636950>,
'name': 'b_loc',
'type': 'param',
'value': tensor(0., requires_grad=True)},
'b_scale': {'args': (tensor(1.), GreaterThan(lower_bound=0.0)),
'fn': <function param.<locals>.fn at 0x11f6369d8>,
'name': 'b_scale',
'type': 'param',
'value': tensor(1., grad_fn=<AddBackward0>)},
'w': {'args': (),
'fn': Normal(loc: 1.0, scale: 1.0),
'name': 'w',
'type': 'sample',
'value': tensor(2.8532, grad_fn=<AddBackward0>)},
'w_loc': {'args': (tensor(1.), Real()),
'fn': <function param.<locals>.fn at 0x11f636840>,
'name': 'w_loc',
'type': 'param',
'value': tensor(1., requires_grad=True)},
'w_scale': {'args': (tensor(1.), GreaterThan(lower_bound=0.0)),
'fn': <function param.<locals>.fn at 0x11f6368c8>,
'name': 'w_scale',
'type': 'param',
'value': tensor(1., grad_fn=<AddBackward0>)}}
{'b': {'args': (),
'fn': Normal(loc: 0.5, scale: 1.0),
'name': 'b',
'type': 'sample',
'value': tensor(-2.0570, grad_fn=<AddBackward0>)},
'obs': {'args': (),
'fn': Normal(loc: torch.Size([2]), scale: torch.Size([2])),
'name': 'obs',
'type': 'sample',
'value': tensor([0.9051, 1.3051])},
'w': {'args': (),
'fn': Normal(loc: 0.0, scale: 1.0),
'name': 'w',
'type': 'sample',
'value': tensor(2.8532, grad_fn=<AddBackward0>)}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment