composite_lp_aggregate#
- tensordict.nn.composite_lp_aggregate(nowarn: bool = False) bool#
Returns whether a
CompositeDistributionsums its log-probabilities in one tensor.The value also applies to entropies. It is
Falseunlessset_composite_lp_aggregateor theCOMPOSITE_LP_AGGREGATEenvironment variable set it toTrue. See the log-probability key table ofProbabilisticTensorDictModulefor what each value changes.- Parameters:
nowarn (bool, optional) – has no effect. It is kept so that calls that pass it keep working. Defaults to
False.
See also
Examples
>>> from tensordict.nn import composite_lp_aggregate, set_composite_lp_aggregate >>> with set_composite_lp_aggregate(True): ... composite_lp_aggregate() True