gflownet.losses.forwardlooking ============================== .. py:module:: gflownet.losses.forwardlooking .. autoapi-nested-parse:: Forward Looking loss or objective for training GFlowNets. The Forward Looking (FL) loss or objective was defined by Pan et al. (2023): .. _a link: https://arxiv.org/abs/2302.01687 Classes ------- .. autoapisummary:: gflownet.losses.forwardlooking.ForwardLooking Module Contents --------------- .. py:class:: ForwardLooking(**kwargs) Bases: :py:obj:`gflownet.losses.detailedbalance.DetailedBalance` Initialization method for the Forward Looking loss class. .. attribute:: name The name of the loss or objective function: Forward Looking :type: str .. attribute:: acronym The acronym of the loss or objective function: FL :type: str .. attribute:: id The identifier of the loss or objective function: forwardlooking :type: str .. py:attribute:: name :value: 'Forward Looking' .. py:attribute:: acronym :value: 'FL' .. py:attribute:: id :value: 'forwardlooking' .. py:method:: compute_losses_of_batch(batch) 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). .. _a link: https://arxiv.org/abs/2302.01687 :param batch: A batch of states. :type batch: Batch :returns: **losses** (*tensor*) -- The loss of each state in the batch.