class_docstr: This class implements a regressor with the PyTorch framework.
class_docstr_tok: ["This","class","implements","a","regressor","with","the","PyTorch","framework","."]
docstr: Create a copy of the regressor that can be refit from scratch. Will inherit same architecture, optimizer and
  initialization as cloned model, but without weights.
  
  :return: new estimator
docstr_tok: ["Create","a","copy","of","the","regressor","that","can","be","refit","from","scratch",".","Will","inherit","same","architecture",",","optimizer","and","initialization","as","cloned","model",",","but","without","weights",".",":","return",":","new","estimator"]
code: def clone_for_refitting(self) -> "PyTorchRegressor":
      """
      Create a copy of the regressor that can be refit from scratch. Will inherit same architecture, optimizer and
      initialization as cloned model, but without weights.
  
      :return: new estimator
      """
      model = copy.deepcopy(self.model)
      clone = type(self)(
          model, self._loss, self.input_shape, optimizer=self._optimizer
      )
      # reset weights
      clone.reset()
      params = self.get_params()
      del params["model"]
      clone.set_params(**params)
      return clone
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import copy
  import logging
  import os
  import time
  from typing import Any, Dict, List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  import six
  from art import config
  from art.estimators.regression.regressor import RegressorMixin
  from art.estimators.pytorch import PyTorchEstimator
label_desc: Use image node_id 14 for calling the PyTorchRegressor obj's underlying member method code with example usage: obj.clone_for_refitting() and returns: clone