class_docstr: Weighted dataloader where `wgts` is used for the training set only
class_docstr_tok: ["Weighted","dataloader","where","`","wgts","`","is","used","for","the","training","set","only"]
code: def __init__(self, dataset=None, bs=None, wgts=None, **kwargs):
      wgts = array([1.0] * len(dataset) if wgts is None else wgts)
      self.wgts = wgts / wgts.sum()
      super().__init__(dataset=dataset, bs=bs, **kwargs)
  
file_path: fastai/fastai/callback/data.py
imports: from __future__ import annotations
  from ..basics import *
label_desc: Use image node_id 1 to create a new WeightedDL object from inherited base classes: TfmdDL with example: obj = WeightedDL(dataset, bs, wgts)