class_docstr: Simple regression task, based on sinusoids, as introduced in [1].
  
  Parameters
  ----------
  num_samples_per_task : int
      Number of examples per task.
  
  num_tasks : int (default: 1,000,000)
      Overall number of tasks to sample.
  
  noise_std : float, optional
      Amount of noise to include in the targets for each task. If `None`, then
      nos noise is included, and the target is a sine function of the input.
  
  transform : callable, optional
      A function/transform that takes a numpy array of size (1,) and returns a
      transformed version of the input.
  
  target_transform : callable, optional
      A function/transform that takes a numpy array of size (1,) and returns a
      transformed version of the target.
  
  dataset_transform : callable, optional
      A function/transform that takes a dataset (ie. a task), and returns a 
      transformed version of it. E.g. `torchmeta.transforms.ClassSplitter()`.
  
  Notes
  -----
  The tasks are created randomly as random sinusoid function. The amplitude
  varies within [0.1, 5.0], the phase within [0, pi], and the inputs are
  sampled uniformly in [-5.0, 5.0]. Due to the way PyTorch handles datasets,
  the number of tasks to be sampled needs to be fixed ahead of time (with
  `num_tasks`). This will typically be equal to `meta_batch_size * num_batches`.
  
  References
  ----------
  .. [1] Finn C., Abbeel P., and Levine, S. (2017). Model-Agnostic Meta-Learning
         for Fast Adaptation of Deep Networks. International Conference on
         Machine Learning (ICML) (https://arxiv.org/abs/1703.03400)
code: def __getitem__(self, index):
      amplitude, phase = self.amplitudes[index], self.phases[index]
      task = SinusoidTask(
          index,
          amplitude,
          phase,
          self._input_range,
          self.noise_std,
          self.num_samples_per_task,
          self.transform,
          self.target_transform,
          np_random=self.np_random,
      )
  
      if self.dataset_transform is not None:
          task = self.dataset_transform(task)
  
      return task
  
file_path: pytorch-meta/torchmeta/toy/sinusoid.py
imports: import numpy
  from torchmeta.utils.data import Task, MetaDataset
label_desc: Use image node_id 5 for calling the Sinusoid obj's underlying member method code with example usage: obj.__getitem__(index) and returns: task