class_docstr: This class is used to group important attributes associated with the pre-trained weights.
  
  Args:
      url (str): The location where we find the weights.
      transforms (Callable): A callable that constructs the preprocessing method (or validation preset transforms)
          needed to use the model. The reason we attach a constructor method rather than an already constructed
          object is because the specific object might have memory and thus we want to delay initialization until
          needed.
      meta (Dict[str, Any]): Stores meta-data related to the weights of the model and its configuration. These can be
          informative attributes (for example the number of parameters/flops, recipe link/methods used in training
          etc), configuration parameters (for example the `num_classes`) needed to construct the model or important
          meta-data (for example the `classes` of a classification model) needed to use the model.
code: def __eq__(self, other: Any) -> bool:
      # We need this custom implementation for correct deep-copy and deserialization behavior.
      # TL;DR: After the definition of an enum, creating a new instance, i.e. by deep-copying or deserializing it,
      # involves an equality check against the defined members. Unfortunately, the `transforms` attribute is often
      # defined with `functools.partial` and `fn = partial(...); assert deepcopy(fn) != fn`. Without custom handling
      # for it, the check against the defined members would fail and effectively prevent the weights from being
      # deep-copied or deserialized.
      # See https://github.com/pytorch/vision/pull/7107 for details.
      if not isinstance(other, Weights):
          return NotImplemented
  
      if self.url != other.url:
          return False
  
      if self.meta != other.meta:
          return False
  
      if isinstance(self.transforms, partial) and isinstance(
          other.transforms, partial
      ):
          return (
              self.transforms.func == other.transforms.func
              and self.transforms.args == other.transforms.args
              and self.transforms.keywords == other.transforms.keywords
          )
      else:
          return self.transforms == other.transforms
  
imports: import fnmatch
  import importlib
  import inspect
  import sys
  from dataclasses import dataclass
  from enum import Enum
  from functools import partial
  from inspect import signature
  from types import ModuleType
  from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Set, Type, TypeVar, Union
  from torch import nn
  from .._internally_replaced_utils import load_state_dict_from_url
label_desc: Use image node_id 1 for calling the Weights obj's underlying member method code with example usage: obj.__eq__(other) and returns: NotImplemented, False, False, unknown, unknown