class_docstr: ## Reconstruction loss
  
  $$L_{Rec} = \sum_{n=1}^N p_n \mathcal{L}(y, \hat{y}_n)$$
  
  $\mathcal{L}$ is the normal loss function between target $y$ and prediction $\hat{y}_n$.
class_docstr_tok: ["#","#","Reconstruction","loss","$","$","L_","{","Rec","}","=","\\sum_","{","n=1","}","^N","p_n","\\mathcal","{","L","}","(","y",",","\\hat","{","y","}","_n",")","$","$","$","\\mathcal","{","L","}","$","is","the","normal","loss","function","between","target","$","y","$","and","prediction","$","\\hat","{","y","}","_n","$","."]
docstr: * `loss_func` is the loss function $\mathcal{L}$
docstr_tok: ["*","`","loss_func","`","is","the","loss","function","$","\\mathcal","{","L","}","$"]
code: def __init__(self, loss_func: nn.Module):
      """
      * `loss_func` is the loss function $\mathcal{L}$
      """
      super().__init__()
      self.loss_func = loss_func
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/adaptive_computation/ponder_net/__init__.py
imports: from typing import Tuple
  import torch
  from torch import nn
  from labml_helpers.module import Module
label_desc: Use image node_id 1 to create a new ReconstructionLoss object from inherited base classes: Module with example: obj = ReconstructionLoss(loss_func)