Metrics
discrete_diffusion.evaluations.metrics
BD3Metrics
Bases: Metrics
Extension of Metrics with BD3-specific variance tracking.
Source code in src/discrete_diffusion/evaluations/metrics.py
BPD
Bases: NLL
Source code in src/discrete_diffusion/evaluations/metrics.py
NFEs
NLL
Bases: MeanMetric
Source code in src/discrete_diffusion/evaluations/metrics.py
update(value, weight=1.0)
Update state with data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Value
|
Either a float or tensor containing data. Additional tensor dimensions will be flattened |
required |
weight
|
Value
|
Either a float or tensor containing weights
for calculating the average. Shape of weight should
be able to broadcast with the shape of |
1.0
|
Source code in src/discrete_diffusion/evaluations/metrics.py
Perplexity
Bases: NLL