

from ...utils import is_note_seq_available, is_transformers_available, is_torch_available
from ...utils import OptionalDependencyNotAvailable


try:
					if not (is_transformers_available() and is_torch_available()):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
					from .notes_encoder import SpectrogramNotesEncoder
					from .continous_encoder import SpectrogramContEncoder
					from .pipeline_spectrogram_diffusion import (
					    SpectrogramContEncoder,
					    SpectrogramDiffusionPipeline,
					    TaFilmDecoder,
					)

try:
					if not (is_transformers_available() and is_torch_available() and is_note_seq_available()):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_transformers_and_torch_and_note_seq_objects import *  # noqa F403
else:
					from .midi_utils import MidiProcessor





from ...configuration_utils import PretrainedConfig
from ...utils import logging


SCREAMING_SNAKE_CASE_        =      logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_        =      {'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}

class 				a  (	UpperCAmelCase				):
						_lowercase    						=			"openai-gpt"
						_lowercase    						=			{
						    "max_position_embeddings": "n_positions",
						    "hidden_size": "n_embd",
						    "num_attention_heads": "n_head",
						    "num_hidden_layers": "n_layer",
						}


						def __init__(       self						,					A_=40478						,					A_=512						,					A_=768						,					A_=12						,					A_=12						,					A_="gelu"						,					A_=0.1						,					A_=0.1						,					A_=0.1						,					A_=1e-5						,					A_=0.02						,					A_="cls_index"						,					A_=True						,					A_=None						,					A_=True						,					A_=0.1						,					**A_						,					):







										'''simple docstring'''


										_UpperCAmelCase       :		Any 		=    vocab_size
										_UpperCAmelCase       :		str 		=    n_positions
										_UpperCAmelCase       :		List[Any] 		=    n_embd
										_UpperCAmelCase       :		Dict 		=    n_layer
										_UpperCAmelCase       :		Any 		=    n_head
										_UpperCAmelCase       :		int 		=    afn
										_UpperCAmelCase       :		int 		=    resid_pdrop
										_UpperCAmelCase       :		Tuple 		=    embd_pdrop
										_UpperCAmelCase       :		Optional[Any] 		=    attn_pdrop
										_UpperCAmelCase       :		Any 		=    layer_norm_epsilon
										_UpperCAmelCase       :		List[str] 		=    initializer_range
										_UpperCAmelCase       :		Union[str, Any] 		=    summary_type
										_UpperCAmelCase       :		List[Any] 		=    summary_use_proj
										_UpperCAmelCase       :		Optional[Any] 		=    summary_activation
										_UpperCAmelCase       :		int 		=    summary_first_dropout
										_UpperCAmelCase       :		List[str] 		=    summary_proj_to_labels
										super().__init__(**A_	)


