code: def sample_differentiable(
      X_hat_split: List[torch.Tensor],
      category_map: Dict[int, List[str]],
  ) -> List[torch.Tensor]:
      """
      Samples differentiable reconstruction.
  
      Parameters
      ----------
      X_hat_split
          List of reconstructed columns form the auto-encoder.
      category_map
          Dictionary of category mapping. The keys are column indexes and the values are lists containing the possible
          values for an attribute.
  
      Returns
      -------
      Differentiable reconstruction.
      """
      num_attr = len(X_hat_split) - len(category_map)
      cat_attr = len(category_map)
      X_out = []
  
      # Pass numerical attributes as they are
      if num_attr > 0:
          X_out.append(X_hat_split[0])
  
      # Sample categorical attributes
      if cat_attr > 0:
          for head in X_hat_split[-cat_attr:]:
              out = torch.argmax(head, dim=1)
  
              # transform to one-hot encoding
              out = F.one_hot(out, num_classes=head.shape[1])
              proba = F.softmax(head, dim=1)
              out = out - proba.detach() + proba
              X_out.append(out)
  
      return X_out
  
file_path: alibi/alibi/explainers/backends/pytorch/cfrl_tabular.py
imports: from typing import List, Dict
  import torch
  import torch.nn.functional
  from alibi.explainers.backends.cfrl_tabular import split_ohe, generate_condition
  from alibi.explainers.backends.pytorch.cfrl_base import get_actor, get_critic, get_optimizer, data_generator, encode, decode, generate_cf, update_actor_critic, add_noise, to_numpy, to_tensor, set_seed, save_model, load_model
label_desc: Use image node_id 1 for calling a global function with example usage: sample_differentiable(X_hat_split, category_map) and returns: X_out