gflownet.losses.forwardlooking
Forward Looking loss or objective for training GFlowNets.
The Forward Looking (FL) loss or objective was defined by Pan et al. (2023):
Classes
Initialization method for the Forward Looking loss class. |
Module Contents
- class gflownet.losses.forwardlooking.ForwardLooking(**kwargs)[source]
Bases:
gflownet.losses.detailedbalance.DetailedBalanceInitialization method for the Forward Looking loss class.
- compute_losses_of_batch(batch)[source]
Computes the Forward Looking loss for each state of the input batch.
The Forward Looking (FL) loss or objective is computed in this method as is defined in Equation 11 of Pan et al. (2023).
- Parameters:
batch (Batch) – A batch of states.
- Returns:
losses (tensor) – The loss of each state in the batch.
- Return type:
torchtyping.TensorType[batch_size]