tyxe/guides.py
def init_to_sample(site, distribution):
    """Helper function to set site value to a sample from some given distribution."""
    value = distribution.expand(site["fn"].event_shape).sample().detach()
    t = transform_to(site["fn"].support)
    return t(value)
Helper function to set site value to a sample from some given distribution.
Helper function to set site value to a sample from some given distribution.
Helper function to set site value to a sample from some given distribution .
def init_to_sample(site, distribution):
    value = distribution.expand(site["fn"].event_shape).sample().detach()
    t = transform_to(site["fn"].support)
    return t(value)
def init_to_sample ( site , distribution ) : value = distribution . expand ( site [ "fn" ] . event_shape ) . sample ( ) . detach ( ) t = transform_to ( site [ "fn" ] . support ) return t ( value )
Helper function to set site value to a sample from some given distribution.
Helper function to set site value to a sample from some given distribution .
"""Helper function to set site value to a sample from some given distribution."""
site
distribution