class_docstr: Seq2Slate without a decoder learned in a supervised learning fashion (
  https://arxiv.org/pdf/1904.06813.pdf )
class_docstr_tok: ["Seq2Slate","without","a","decoder","learned","in","a","supervised","learning","fashion","(","https",":","\/\/arxiv.org\/pdf\/1904.06813.pdf",")"]
code: def __init__(
      self,
      seq2slate_net: Seq2SlateTransformerNet,
      slate_size: int,
      calc_cpe: bool,
      policy_optimizer: Optimizer__Union = field(  # noqa: B008
          default_factory=Optimizer__Union.default
      ),
  ) -> None:
      super().__init__()
      self.seq2slate_net = seq2slate_net
      self.slate_size = slate_size
      self.calc_cpe = calc_cpe
      self.policy_optimizer = policy_optimizer
      self.log_softmax = nn.LogSoftmax(dim=1)
      self.kl_loss = nn.KLDivLoss(reduction="batchmean")
  
file_path: ReAgent/reagent/training/ranking/seq2slate_attn_trainer.py
imports: import logging
  import numpy
  import reagent.core.types
  import torch
  import torch.nn
  from reagent.core.dataclasses import field
  from reagent.model_utils.seq2slate_utils import Seq2SlateMode
  from reagent.models.seq2slate import Seq2SlateTransformerNet
  from reagent.optimizer.union import Optimizer__Union
  from reagent.training.reagent_lightning_module import ReAgentLightningModule
  from sklearn.metrics import average_precision_score, dcg_score, ndcg_score, roc_auc_score
label_desc: Use image node_id 1 to create a new Seq2SlatePairwiseAttnTrainer object from inherited base classes: ReAgentLightningModule with example: obj = Seq2SlatePairwiseAttnTrainer(seq2slate_net, slate_size, calc_cpe, policy_optimizer)