class_docstr: Metaclass to return a ClassyModel instance wrapped by a ClassyModelWrapper.
class_docstr_tok: ["Metaclass","to","return","a","ClassyModel","instance","wrapped","by","a","ClassyModelWrapper","."]
docstr: Override the __call__ function for the metaclass.
  
  This is called when a new instance of a class with this class as its metaclass
  is initialized. For example -
  
  .. code-block:: python
    class MyClass(metaclass=_ClassyModelMeta):
        wrapper_cls = MyWrapper
  
    my_class_instance = MyClass()  # returned instance will be a MyWrapper
code: def __call__(cls, *args, **kwargs):
      """Override the __call__ function for the metaclass.
  
      This is called when a new instance of a class with this class as its metaclass
      is initialized. For example -
  
      .. code-block:: python
        class MyClass(metaclass=_ClassyModelMeta):
            wrapper_cls = MyWrapper
  
        my_class_instance = MyClass()  # returned instance will be a MyWrapper
      """
      classy_model = super().__call__(*args, **kwargs)
  
      wrapper_cls = cls.wrapper_cls
      if wrapper_cls is not None:
          # wrap the ClassyModel instance with a wrapper class and return that instead
          classy_model = wrapper_cls(classy_model)
      return classy_model
  
imports: import copy
  import types
  from typing import Any, Dict, List, Optional, Tuple
  import torch
  import torch.nn
  from classy_vision.generic.util import log_class_usage
  from classy_vision.heads.classy_head import ClassyHead
  from .classy_block import ClassyBlock
label_desc: Use image node_id 1 for calling the _ClassyModelMeta obj's underlying member method code with example usage: obj.__call__(cls) and returns: classy_model