class_docstr: Implements a MultitaskRegressor that performs on-the-fly transformation during fit/predict.
  
  Examples
  --------
  >>> n_samples = 10
  >>> n_features = 3
  >>> n_tasks = 1
  >>> ids = np.arange(n_samples)
  >>> X = np.random.rand(n_samples, n_features, n_features)
  >>> y = np.zeros((n_samples, n_tasks))
  >>> w = np.ones((n_samples, n_tasks))
  >>> dataset = dc.data.NumpyDataset(X, y, w, ids)
  >>> fit_transformers = [dc.trans.CoulombFitTransformer(dataset)]
  >>> model = dc.models.MultitaskFitTransformRegressor(n_tasks, [n_features, n_features],
  ...     dropouts=[0.], learning_rate=0.003, weight_init_stddevs=[np.sqrt(6)/np.sqrt(1000)],
  ...     batch_size=n_samples, fit_transformers=fit_transformers)
  >>> model.n_features
  12
class_docstr_tok: ["Implements","a","MultitaskRegressor","that","performs","on-the-fly","transformation","during","fit\/predict",".","Examples","--","--","--","--",">",">",">","n_samples","=","10",">",">",">","n_features","=","3",">",">",">","n_tasks","=","1",">",">",">","ids","=","np.arange","(","n_samples",")",">",">",">","X","=","np.random.rand","(","n_samples",",","n_features",",","n_features",")",">",">",">","y","=","np.zeros","(","(","n_samples",",","n_tasks",")",")",">",">",">","w","=","np.ones","(","(","n_samples",",","n_tasks",")",")",">",">",">","dataset","=","dc.data.NumpyDataset","(","X",",","y",",","w",",","ids",")",">",">",">","fit_transformers","=","[","dc.trans.CoulombFitTransformer","(","dataset",")","]",">",">",">","model","=","dc.models.MultitaskFitTransformRegressor","(","n_tasks",",","[","n_features",",","n_features","]",",","...","dropouts=","[","0",".","]",",","learning_rate=0.003",",","weight_init_stddevs=","[","np.sqrt","(","6",")","\/np.sqrt","(","1000",")","]",",","...","batch_size=n_samples",",","fit_transformers=fit_transformers",")",">",">",">","model.n_features","12"]
code: def default_generator(
      self,
      dataset: dc.data.Dataset,
      epochs: int = 1,
      mode: str = "fit",
      deterministic: bool = True,
      pad_batches: bool = True,
  ) -> Iterable[Tuple[List, List, List]]:
      empty: np.ndarray = np.array([])
      for epoch in range(epochs):
          for X_b, y_b, w_b, ids_b in dataset.iterbatches(
              batch_size=self.batch_size,
              deterministic=deterministic,
              pad_batches=pad_batches,
          ):
              if y_b is not None:
                  y_b = y_b.reshape(-1, self.n_tasks, 1)
              if X_b is not None:
                  if mode == "fit":
                      for transformer in self.fit_transformers:
                          X_b, _, _, _ = transformer.transform_array(
                              X_b, empty, empty, empty
                          )
              if mode == "predict":
                  dropout = np.array(0.0)
              else:
                  dropout = np.array(1.0)
              yield ([X_b, dropout], [y_b], [w_b])
  
imports: import logging
  import numpy
  import torch
  import torch.nn.functional
  from collections.abc import Sequence
  import deepchem
  from deepchem.models.torch_models.torch_model import TorchModel
  from deepchem.models.losses import _make_pytorch_shapes_consistent
  from deepchem.metrics import to_one_hot
  from typing import Any, Callable, Iterable, List, Optional, Sequence, Tuple, Union
  from deepchem.utils.typing import ActivationFn, LossFn, OneOrMany
  from deepchem.utils.pytorch_utils import get_activation
label_desc: Use image node_id 2 for calling the MultitaskFitTransformRegressor obj's underlying member method code with example usage: obj.default_generator(dataset, epochs, mode, deterministic, pad_batches) without return types