code: 
  
  
  """simple docstring"""
  
  
  
  
  
  
  
  import torch
  import torch.nn.functional as F
  
  from diffusers import VQDiffusionScheduler
  
  from .test_schedulers import SchedulerCommonTest
  
  
  
  
  
  
  class    __A       ( _SCREAMING_SNAKE_CASE    ):
  
  
  
  
  
  
   """simple docstring"""
  
  
  
  
   __lowerCAmelCase				      =						(VQDiffusionScheduler,)
  
  
   def    SCREAMING_SNAKE_CASE							(	self				,					**__A		)      ->  Tuple:
       a					={
           '''num_vec_classes''': 4097,
           '''num_train_timesteps''': 100,
       }
  
       config.update(**__A		)
       return config
  
  
   def    SCREAMING_SNAKE_CASE							(	self				,					__A		)      ->  Any:
       a					=4
       a					=8
       a					=8
  
       a					=torch.randint(0				,					__A				,					(batch_size, height * width)		)
  
       return sample
  
  
   @property
   def    SCREAMING_SNAKE_CASE							(	self		)      ->  Optional[Any]:
       assert False
  
  
   def    SCREAMING_SNAKE_CASE							(	self				,					__A		)      ->  Tuple:
       def model(__A				,					__A				,					*__A		):
           a	,   a					=sample.shape
           a					=torch.rand((batch_size, num_vec_classes - 1, num_latent_pixels)		)
           a					=F.log_softmax(logits.double()				,					dim=1		).float()
           return return_value
  
       return model
  
  
   def    SCREAMING_SNAKE_CASE							(	self		)      ->  Dict:
       for timesteps in [2, 5, 100, 1000]:
           self.check_over_configs(num_train_timesteps=__A		)
  
  
   def    SCREAMING_SNAKE_CASE							(	self		)      ->  List[str]:
       for num_vec_classes in [5, 100, 1000, 4000]:
           self.check_over_configs(num_vec_classes=__A		)
  
  
   def    SCREAMING_SNAKE_CASE							(	self		)      ->  List[str]:
       for t in [0, 50, 99]:
           self.check_over_forward(time_step=__A		)
  
  
  
  
  
   def    SCREAMING_SNAKE_CASE							(	self		)      ->  str:
       pass
style_context: 
  
  
  """simple docstring"""
  
  
  
  
  
  
  
  from typing import TYPE_CHECKING
  
  from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available
  
  
  lowerCamelCase_     :     Any    		=						{"""configuration_dinat""": ["""DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """DinatConfig"""]}
  
  
  try:
         if not is_torch_available():
                raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
         pass
  else:
         lowerCamelCase_     :     List[str]    		=						[
             """DINAT_PRETRAINED_MODEL_ARCHIVE_LIST""",
             """DinatForImageClassification""",
             """DinatModel""",
             """DinatPreTrainedModel""",
             """DinatBackbone""",
         ]
  
  if TYPE_CHECKING:
         from .configuration_dinat import DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP, DinatConfig
  
         try:
                if not is_torch_available():
                       raise OptionalDependencyNotAvailable()
         except OptionalDependencyNotAvailable:
                pass
         else:
                from .modeling_dinat import (
                    DINAT_PRETRAINED_MODEL_ARCHIVE_LIST,
                    DinatBackbone,
                    DinatForImageClassification,
                    DinatModel,
                    DinatPreTrainedModel,
                )
  
  else:
         import sys
  
         lowerCamelCase_     :     List[Any]    		=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)