class_docstr: Stream that uniformly selects n out of k given transforms.
class_docstr_tok: ["Stream","that","uniformly","selects","n","out","of","k","given","transforms","."]
docstr: Applies randomly selected n transforms to the given data item
  
  Parameters
  ----------
  data : DataContainer
      Data to be augmented
  return_torch : bool
      Whether to convert the result into a torch tensors
  as_dict : bool
      Whether to pool the results into a dict. See ``solt.core.DataContainer.to_dict``
      for details.
  scale_keypoints : bool
      Whether to scale the keypoints into 0-1 range
  normalize : bool
      Whether to normalize the resulting tensor. If mean or std args are None,
      ImageNet statistics will be used
  mean : None or tuple of float or np.ndarray or torch.FloatTensor
      Mean to subtract for the converted tensor
  std : None or tuple of float or np.ndarray or torch.FloatTensor
      Mean to subtract for the converted tensor
  
  Returns
  -------
  out : DataContainer
      Result
docstr_tok: ["Applies","randomly","selected","n","transforms","to","the","given","data","item","Parameters","--","--","--","--","--","data",":","DataContainer","Data","to","be","augmented","return_torch",":","bool","Whether","to","convert","the","result","into","a","torch","tensors","as_dict",":","bool","Whether","to","pool","the","results","into","a","dict",".","See","``","solt.core.DataContainer.to_dict","``","for","details",".","scale_keypoints",":","bool","Whether","to","scale","the","keypoints","into","0-1","range","normalize",":","bool","Whether","to","normalize","the","resulting","tensor",".","If","mean","or","std","args","are","None",",","ImageNet","statistics","will","be","used","mean",":","None","or","tuple","of","float","or","np.ndarray","or","torch.FloatTensor","Mean","to","subtract","for","the","converted","tensor","std",":","None","or","tuple","of","float","or","np.ndarray","or","torch.FloatTensor","Mean","to","subtract","for","the","converted","tensor","Returns","--","--","--","-","out",":","DataContainer","Result"]
code: def __call__(
      self,
      data,
      return_torch=True,
      as_dict=True,
      scale_keypoints=True,
      normalize=True,
      mean=None,
      std=None,
  ):
      """
      Applies randomly selected n transforms to the given data item
  
      Parameters
      ----------
      data : DataContainer
          Data to be augmented
      return_torch : bool
          Whether to convert the result into a torch tensors
      as_dict : bool
          Whether to pool the results into a dict. See ``solt.core.DataContainer.to_dict``
          for details.
      scale_keypoints : bool
          Whether to scale the keypoints into 0-1 range
      normalize : bool
          Whether to normalize the resulting tensor. If mean or std args are None,
          ImageNet statistics will be used
      mean : None or tuple of float or np.ndarray or torch.FloatTensor
          Mean to subtract for the converted tensor
      std : None or tuple of float or np.ndarray or torch.FloatTensor
          Mean to subtract for the converted tensor
  
      Returns
      -------
      out : DataContainer
          Result
      """
      data = BaseTransform.wrap_data(data)
  
      if len(self.transforms) > 0:
          random_state = np.random.RandomState(
              random.randint(0, 2**32 - 1)
          )
          trfs = random_state.choice(
              self.transforms, self.n, replace=False, p=self.probs
          )
          if self.optimize_stack:
              trfs = [copy.deepcopy(x) for x in trfs]
              trfs = Stream.optimize_transforms_stack(trfs, data)
          data = Stream.exec_stream(trfs, data, self.optimize_stack)
  
      if return_torch:
          return data.to_torch(
              as_dict=as_dict,
              scale_keypoints=scale_keypoints,
              normalize=normalize,
              mean=mean,
              std=std,
          )
  
      return data
  
file_path: solt/solt/core/_core.py
imports: import numpy
  from ._base_transforms import BaseTransform, MatrixTransform
  import copy
  import random
  from solt.utils import Serializable
  from ._data import DataContainer
label_desc: Use image node_id 2 for calling the SelectiveStream obj's underlying member method code with example usage: obj.__call__(data, return_torch, as_dict, scale_keypoints, normalize, mean, std) and returns: data, data