class_docstr: Simple regression task, based on the sum of two sine waves, as introduced
  in [1].
  
  Parameters
  ----------
  num_samples_per_task : int
      Number of examples per task.
  
  num_tasks : int (default: 5,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 the sum of 2 sine functions 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 the sum of two sinusoid functions, with
  a frequency ratio of 2. The amplitudes vary within [5.0, 7.0], the phases
  within [0, 2 * pi], and the inputs are sampled according to N(mu_x, 1), with
  mu_x varying in [-4.0, 4.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] Lacoste A., Oreshkin B., Chung W., Boquet T., Rostamzadeh N.,
         Krueger D. (2018). Uncertainty in Multitask Transfer Learning. In
         Advances in Neural Information Processing Systems (https://arxiv.org/abs/1806.07528)
code: def phases(self):
      if self._phases is None:
          self._phases = self.np_random.uniform(
              self._phase_range[0],
              self._phase_range[1],
              size=(self.num_tasks, 2),
          )
      return self._phases
  
file_path: pytorch-meta/torchmeta/toy/harmonic.py
imports: import numpy
  from torchmeta.utils.data import Task, MetaDataset
label_desc: Use image node_id 4 for calling the Harmonic obj's underlying member method code with example usage: obj.phases() and returns: self