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"]
docstr: Create a MultitaskFitTransformRegressor.
  
  In addition to the following arguments, this class also accepts all the keywork arguments
  from MultitaskRegressor.
  
  Parameters
  ----------
  n_tasks: int
      number of tasks
  n_features: list or int
      number of features
  fit_transformers: list
      List of dc.trans.FitTransformer objects
docstr_tok: ["Create","a","MultitaskFitTransformRegressor",".","In","addition","to","the","following","arguments",",","this","class","also","accepts","all","the","keywork","arguments","from","MultitaskRegressor",".","Parameters","--","--","--","--","--","n_tasks",":","int","number","of","tasks","n_features",":","list","or","int","number","of","features","fit_transformers",":","list","List","of","dc.trans.FitTransformer","objects"]
code: def __init__(
      self,
      n_tasks: int,
      n_features: int,
      fit_transformers: Sequence[dc.trans.Transformer] = [],
      batch_size: int = 50,
      **kwargs,
  ):
      """Create a MultitaskFitTransformRegressor.
  
      In addition to the following arguments, this class also accepts all the keywork arguments
      from MultitaskRegressor.
  
      Parameters
      ----------
      n_tasks: int
          number of tasks
      n_features: list or int
          number of features
      fit_transformers: list
          List of dc.trans.FitTransformer objects
      """
      self.fit_transformers = fit_transformers
  
      # Run fit transformers on dummy dataset to determine n_features after transformation
  
      if isinstance(n_features, list):
          X_b = np.ones([batch_size] + n_features)
      elif isinstance(n_features, int):
          X_b = np.ones([batch_size, n_features])
      else:
          raise ValueError("n_features should be list or int")
      empty: np.ndarray = np.array([])
      for transformer in fit_transformers:
          assert transformer.transform_X and not (
              transformer.transform_y or transformer.transform_w
          )
          X_b, _, _, _ = transformer.transform_array(
              X_b, empty, empty, empty
          )
      n_features = X_b.shape[1]
      logger.info("n_features after fit_transform: %d", int(n_features))
      super(MultitaskFitTransformRegressor, self).__init__(
          n_tasks, n_features, batch_size=batch_size, **kwargs
      )
  
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 1 to create a new MultitaskFitTransformRegressor object from inherited base classes: MultitaskRegressor with example: obj = MultitaskFitTransformRegressor(n_tasks, n_features, fit_transformers, batch_size)