class_docstr: ### Parity dataset
docstr: * `n_samples` is the number of samples
  * `n_elems` is the number of elements in the input vector
docstr_tok: ["*","`","n_samples","`","is","the","number","of","samples","*","`","n_elems","`","is","the","number","of","elements","in","the","input","vector"]
code: def __init__(self, n_samples: int, n_elems: int = 64):
      """
      * `n_samples` is the number of samples
      * `n_elems` is the number of elements in the input vector
      """
      self.n_samples = n_samples
      self.n_elems = n_elems
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/adaptive_computation/parity.py
imports: from typing import Tuple
  import torch
  from torch.utils.data import Dataset
label_desc: Use image node_id 1 to create a new ParityDataset object from inherited base classes: Dataset with example: obj = ParityDataset(n_samples, n_elems)