code: def resize(self, net: Tensor, *, determinate: bool = False) -> Tensor:
      if self.img_size is None:
          return net
      return interpolate(
          net, size=self.img_size, determinate=determinate
      )
  
imports: from torch import Tensor
  from typing import Any
  from typing import Dict
  from typing import Type
  from typing import Optional
  from cftool.misc import safe_execute
  from cftool.misc import print_warning
  from cftool.misc import shallow_copy_dict
  from cftool.misc import WithRegister
  from cftool.types import tensor_dict_type
  from ....schema import _forward
  from ....schema import TrainerState
  from ....constants import INPUT_KEY
  from ....constants import LABEL_KEY
  from ....constants import PREDICTIONS_KEY
  from ....misc.toolkit import interpolate
  from ....misc.toolkit import auto_num_layers
  from ....modules.blocks import ChannelPadding
label_desc: Use image node_id 3 for calling the IDecoder obj's underlying member method code with example usage: obj.resize(net) and returns: interpolate, net