class_docstr: Transformer MLP block.
class_docstr_tok: ["Transformer","MLP","block","."]
code: def _load_from_state_dict(
      self,
      state_dict,
      prefix,
      local_metadata,
      strict,
      missing_keys,
      unexpected_keys,
      error_msgs,
  ):
      version = local_metadata.get("version", None)
  
      if version is None or version < 2:
          # Replacing legacy MLPBlock with MLP. See https://github.com/pytorch/vision/pull/6053
          for i in range(2):
              for type in ["weight", "bias"]:
                  old_key = f"{prefix}linear_{i+1}.{type}"
                  new_key = f"{prefix}{3*i}.{type}"
                  if old_key in state_dict:
                      state_dict[new_key] = state_dict.pop(old_key)
  
      super()._load_from_state_dict(
          state_dict,
          prefix,
          local_metadata,
          strict,
          missing_keys,
          unexpected_keys,
          error_msgs,
      )
  
imports: import math
  from collections import OrderedDict
  from functools import partial
  from typing import Any, Callable, Dict, List, NamedTuple, Optional
  import torch
  import torch.nn
  from ..ops.misc import Conv2dNormActivation, MLP
  from ..transforms._presets import ImageClassification, InterpolationMode
  from ..utils import _log_api_usage_once
  from ._api import register_model, Weights, WeightsEnum
  from ._meta import _IMAGENET_CATEGORIES
  from ._utils import _ovewrite_named_param, handle_legacy_interface
label_desc: Use image node_id 2 for calling the MLPBlock obj's underlying member method code with example usage: obj._load_from_state_dict(state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs) without return types