

"""simple docstring"""






import argparse
import json
import os.path
from collections import OrderedDict

import numpy as np
import requests
import torch
from flax.training.checkpoints import restore_checkpoint
from huggingface_hub import hf_hub_download

from transformers import VivitConfig, VivitForVideoClassification, VivitImageProcessor
from transformers.image_utils import PILImageResampling
def  UpperCamelCase   (     _lowerCAmelCase       :  Any	)			->     int:
	_UpperCAmelCase      :							Dict       =   "https://storage.googleapis.com/scenic-bucket/vivit/kinetics_400/vivit_base_16x2_unfactorized/checkpoint"

	with open(_UpperCamelCase,					"""wb"""	) as f:
		with requests.get(_UpperCamelCase,					stream=_UpperCamelCase	) as req:
			for chunk in req.iter_content(chunk_size=2048	):
				f.write(_UpperCamelCase	)
def  UpperCamelCase   (     )			->     Optional[Any]:
	_UpperCAmelCase      :							Optional[Any]       =   VivitConfig()

	_UpperCAmelCase      :							Optional[int]       =   400
	_UpperCAmelCase      :							str       =   "huggingface/label-files"
	_UpperCAmelCase      :							Optional[Any]       =   "kinetics400-id2label.json"

	_UpperCAmelCase      :							Tuple       =   json.load(open(hf_hub_download(_UpperCamelCase,					_UpperCamelCase,					repo_type="""dataset"""	),					"""r"""	)	)
	_UpperCAmelCase      :							int       =   {int(_UpperCamelCase	): v for k, v in idalabel.items()}
	_UpperCAmelCase      :							int       =   idalabel
	_UpperCAmelCase      :							int       =   {v: k for k, v in idalabel.items()}
	return config
def  UpperCamelCase   (     )			->     Union[str, Any]:
	_UpperCAmelCase      :							Dict       =   hf_hub_download(
	    repo_id="""hf-internal-testing/spaghetti-video""",					filename="""eating_spaghetti_32_frames.npy""",					repo_type="""dataset"""	)
	_UpperCAmelCase      :							Tuple       =   np.load(_UpperCamelCase	)
	return list(_UpperCamelCase	)
def  UpperCamelCase   (     _lowerCAmelCase       :  Optional[int]	)			->     List[str]:




	if np.ndim(_UpperCamelCase	) == 2:
		return transform_attention_bias(_UpperCamelCase	)

	elif np.ndim(_UpperCamelCase	) == 3:
		return transform_attention_kernel(_UpperCamelCase	)

	else:
		raise Exception(f'''Invalid number of dimesions: {np.ndim(_UpperCamelCase	)}'''	)
def  UpperCamelCase   (     _lowerCAmelCase       :  Tuple	)			->     List[Any]:
	return current.flatten()
def  UpperCamelCase   (     _lowerCAmelCase       :  Tuple	)			->     int:
	return np.reshape(_UpperCamelCase,					(current.shape[0], current.shape[1] * current.shape[2])	).T
def  UpperCamelCase   (     _lowerCAmelCase       :  Optional[int]	)			->     int:
	return np.reshape(_UpperCamelCase,					(current.shape[0] * current.shape[1], current.shape[2])	).T
def  UpperCamelCase   (     _lowerCAmelCase       :  List[str],					_lowerCAmelCase       :  Union[str, Any]	)			->     Any:
	_UpperCAmelCase      :							int       =   state_dict["optimizer"]["target"]["Transformer"][f'''encoderblock_{i}''']

	_UpperCAmelCase      :							int       =   f'''encoder.layer.{i}.'''
	_UpperCAmelCase      :							int       =   {
	    prefix + "intermediate.dense.bias": state["MlpBlock_0"]["Dense_0"]["bias"],
	    prefix + "intermediate.dense.weight": np.transpose(state["""MlpBlock_0"""]["""Dense_0"""]["""kernel"""]	),
	    prefix + "output.dense.bias": state["MlpBlock_0"]["Dense_1"]["bias"],
	    prefix + "output.dense.weight": np.transpose(state["""MlpBlock_0"""]["""Dense_1"""]["""kernel"""]	),
	    prefix + "layernorm_before.bias": state["LayerNorm_0"]["bias"],
	    prefix + "layernorm_before.weight": state["LayerNorm_0"]["scale"],
	    prefix + "layernorm_after.bias": state["LayerNorm_1"]["bias"],
	    prefix + "layernorm_after.weight": state["LayerNorm_1"]["scale"],
	    prefix
	    + "attention.attention.query.bias": transform_attention(
	        state["""MultiHeadDotProductAttention_0"""]["""query"""]["""bias"""]	),
	    prefix
	    + "attention.attention.query.weight": transform_attention(
	        state["""MultiHeadDotProductAttention_0"""]["""query"""]["""kernel"""]	),
	    prefix
	    + "attention.attention.key.bias": transform_attention(state["""MultiHeadDotProductAttention_0"""]["""key"""]["""bias"""]	),
	    prefix
	    + "attention.attention.key.weight": transform_attention(
	        state["""MultiHeadDotProductAttention_0"""]["""key"""]["""kernel"""]	),
	    prefix
	    + "attention.attention.value.bias": transform_attention(
	        state["""MultiHeadDotProductAttention_0"""]["""value"""]["""bias"""]	),
	    prefix
	    + "attention.attention.value.weight": transform_attention(
	        state["""MultiHeadDotProductAttention_0"""]["""value"""]["""kernel"""]	),
	    prefix + "attention.output.dense.bias": state["MultiHeadDotProductAttention_0"]["out"]["bias"],
	    prefix
	    + "attention.output.dense.weight": transform_attention_output_weight(
	        state["""MultiHeadDotProductAttention_0"""]["""out"""]["""kernel"""]	),
	}

	return new_state
def  UpperCamelCase   (     _lowerCAmelCase       :  str	)			->     List[str]:
	return sum([1 if """encoderblock_""" in k else 0 for k in state_dict["""optimizer"""]["""target"""]["""Transformer"""].keys()]	)
def  UpperCamelCase   (     _lowerCAmelCase       :  Union[str, Any],					_lowerCAmelCase       :  Optional[int]=False	)			->     List[Any]:
	_UpperCAmelCase      :							Optional[int]       =   get_n_layers(_UpperCamelCase	)

	_UpperCAmelCase      :							int       =   OrderedDict()

	_UpperCAmelCase      :							Optional[int]       =   state_dict["optimizer"]["target"]["Transformer"]["encoder_norm"]["bias"]
	_UpperCAmelCase      :							Optional[Any]       =   state_dict["optimizer"]["target"]["Transformer"]["encoder_norm"]["scale"]

	_UpperCAmelCase      :							Union[str, Any]       =   np.transpose(
	    state_dict["""optimizer"""]["""target"""]["""embedding"""]["""kernel"""],					(4, 3, 0, 1, 2)	)
	_UpperCAmelCase      :							str       =   state_dict["optimizer"]["target"]["embedding"]["bias"]

	_UpperCAmelCase      :							Optional[int]       =   state_dict["optimizer"]["target"]["cls"]
	_UpperCAmelCase      :							Optional[int]       =   state_dict["optimizer"]["target"]["Transformer"]["posembed_input"][
	    "pos_embedding"
	]

	for i in range(_UpperCamelCase	):
		new_state.update(transform_state_encoder_block(_UpperCamelCase,					_UpperCamelCase	)	)

	if classification_head:
		_UpperCAmelCase      :							List[str]       =   {"vivit." + k: v for k, v in new_state.items()}
		_UpperCAmelCase      :							Dict       =   np.transpose(state_dict["""optimizer"""]["""target"""]["""output_projection"""]["""kernel"""]	)
		_UpperCAmelCase      :							int       =   np.transpose(state_dict["""optimizer"""]["""target"""]["""output_projection"""]["""bias"""]	)

	return {k: torch.tensor(_UpperCamelCase	) for k, v in new_state.items()}
def  UpperCamelCase   (     )			->     Union[str, Any]:
	_UpperCAmelCase      :							List[Any]       =   VivitImageProcessor()

	assert extractor.do_resize is True
	assert extractor.size == {"shortest_edge": 256}
	assert extractor.do_center_crop is True
	assert extractor.crop_size == {"width": 224, "height": 224}
	assert extractor.resample == PILImageResampling.BILINEAR

	# here: https://github.com/deepmind/dmvr/blob/master/dmvr/modalities.py
	# one can seen that add_image has default values for normalization_mean and normalization_std set to 0 and 1
	# which effectively means no normalization (and ViViT does not overwrite those when calling this func)
	assert extractor.do_normalize is False
	assert extractor.do_rescale is True
	assert extractor.rescale_factor == 1 / 255

	# zero-centering = True in original implementation
	assert extractor.do_zero_centering is True

	return extractor
def  UpperCamelCase   (     _lowerCAmelCase       :  Optional[int]	)			->     str:
	_UpperCAmelCase      :							Optional[Any]       =   "checkpoint"

	if not os.path.exists(_UpperCamelCase	):
		download_checkpoint(_UpperCamelCase	)

	_UpperCAmelCase      :							Union[str, Any]       =   restore_checkpoint(_UpperCamelCase,					_UpperCamelCase	)
	_UpperCAmelCase      :							List[str]       =   transform_state(_UpperCamelCase,					classification_head=_UpperCamelCase	)

	_UpperCAmelCase      :							Tuple       =   get_vivit_config()

	assert config.image_size == 224
	assert config.num_frames == 32

	_UpperCAmelCase      :							str       =   VivitForVideoClassification(_UpperCamelCase	)
	model.load_state_dict(_UpperCamelCase	)
	model.eval()

	_UpperCAmelCase      :							Optional[Any]       =   get_processor()

	_UpperCAmelCase      :							Optional[int]       =   prepare_video()
	_UpperCAmelCase      :							str       =   extractor(_UpperCamelCase,					return_tensors="""pt"""	)

	_UpperCAmelCase      :							Dict       =   model(**_UpperCamelCase	)

	_UpperCAmelCase      :							Tuple       =   torch.Size([1, 400]	)
	_UpperCAmelCase      :							Dict       =   torch.tensor([-1.0543, 2.0764, -0.2104, 0.4439, -0.9658]	)

	assert outputs.logits.shape == expected_shape
	assert torch.allclose(outputs.logits[0, :5],					_UpperCamelCase,					atol=1E-4	), outputs.logits[0, :5]

	model.save_pretrained(_UpperCamelCase	)
	extractor.save_pretrained(_UpperCamelCase	)


if __name__ == "__main__":
						lowerCamelCase__			:					Dict							  =					argparse.ArgumentParser()

						parser.add_argument('''--output_model_name''', '''-o''', type=str, help='''Output path for the converted HuggingFace model''')

						lowerCamelCase__			:					Tuple							  =					parser.parse_args()
						convert(args.output_model_name)




"""simple docstring"""






from collections import OrderedDict
from typing import Any, Mapping, Optional

from ... import PreTrainedTokenizer
from ...configuration_utils import PretrainedConfig
from ...file_utils import TensorType, is_torch_available
from ...onnx import OnnxConfig, OnnxConfigWithPast, OnnxSeqaSeqConfigWithPast
from ...onnx.utils import compute_effective_axis_dimension
from ...utils import logging


lowerCamelCase__			:					Dict							  =					logging.get_logger(__name__)

lowerCamelCase__			:					Optional[Any]							  =					{
    '''facebook/blenderbot-3B''': '''https://huggingface.co/facebook/blenderbot-3B/resolve/main/config.json''',
    # See all Blenderbot models at https://huggingface.co/models?filter=blenderbot
}






class       _UpperCAmelCase     (						__a):
			__a	:    Optional[int]			   =							"""blenderbot"""
			__a	:    Tuple			   =							["""past_key_values"""]
			__a	:    int			   =							{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}
			def __init__(						self ,						_A=80_08 ,						_A=1_28 ,						_A=2 ,						_A=1_02_40 ,						_A=32 ,						_A=24 ,						_A=1_02_40 ,						_A=32 ,						_A=0.0 ,						_A=0.0 ,						_A=True ,						_A=True ,						_A="gelu" ,						_A=25_60 ,						_A=0.1 ,						_A=0.0 ,						_A=0.0 ,						_A=0.02 ,						_A=1 ,						_A=False ,						_A=0 ,						_A=1 ,						_A=2 ,						_A=3 ,						_A=2 ,						**_A ,						)      ->      Union[str, Any]:






				'''simple docstring'''







				_UpperCAmelCase      :							Any       =   vocab_size
				_UpperCAmelCase      :							Dict       =   max_position_embeddings
				_UpperCAmelCase      :							Optional[int]       =   d_model
				_UpperCAmelCase      :							Optional[Any]       =   encoder_ffn_dim
				_UpperCAmelCase      :							Optional[Any]       =   encoder_layers
				_UpperCAmelCase      :							List[Any]       =   encoder_attention_heads
				_UpperCAmelCase      :							str       =   decoder_ffn_dim
				_UpperCAmelCase      :							int       =   decoder_layers
				_UpperCAmelCase      :							List[str]       =   decoder_attention_heads
				_UpperCAmelCase      :							List[Any]       =   dropout
				_UpperCAmelCase      :							List[str]       =   attention_dropout
				_UpperCAmelCase      :							int       =   activation_dropout
				_UpperCAmelCase      :							Union[str, Any]       =   activation_function
				_UpperCAmelCase      :							List[str]       =   init_std
				_UpperCAmelCase      :							Dict       =   encoder_layerdrop
				_UpperCAmelCase      :							Union[str, Any]       =   decoder_layerdrop
				_UpperCAmelCase      :							str       =   use_cache
				_UpperCAmelCase      :							Optional[int]       =   encoder_layers
				_UpperCAmelCase      :							Union[str, Any]       =   scale_embedding  # scale factor will be sqrt(d_model) if True

				super().__init__(
				    pad_token_id=_A ,						bos_token_id=_A ,						eos_token_id=_A ,						is_encoder_decoder=_A ,						decoder_start_token_id=_A ,						encoder_no_repeat_ngram_size=_A ,						forced_eos_token_id=_A ,						**_A ,						)






class       _UpperCAmelCase     (						__a):
			@property
			def 							__snake_case	(						self       )      ->      Mapping[str, Mapping[int, str]]:






				'''simple docstring'''







				if self.task in ["default", "seq2seq-lm"]:
					_UpperCAmelCase      :							Tuple       =   OrderedDict(
					    [
					        ("""input_ids""", {0: """batch""", 1: """encoder_sequence"""}),
					        ("""attention_mask""", {0: """batch""", 1: """encoder_sequence"""}),
					    ]       )
					if self.use_past:
						_UpperCAmelCase      :							List[str]       =   {0: """batch"""}
						_UpperCAmelCase      :							List[str]       =   {0: """batch""", 1: """past_decoder_sequence + sequence"""}
					else:
						_UpperCAmelCase      :							Optional[int]       =   {0: """batch""", 1: """decoder_sequence"""}
						_UpperCAmelCase      :							int       =   {0: """batch""", 1: """decoder_sequence"""}
					if self.use_past:
						self.fill_with_past_key_values_(_A ,						direction="""inputs"""       )
				elif self.task == "causal-lm":
					_UpperCAmelCase      :							List[str]       =   OrderedDict(
					    [
					        ("""input_ids""", {0: """batch""", 1: """encoder_sequence"""}),
					        ("""attention_mask""", {0: """batch""", 1: """encoder_sequence"""}),
					    ]       )
					if self.use_past:
						_UpperCAmelCase  ,				_UpperCAmelCase      :							Optional[Any]       =   self.num_layers
						for i in range(_A       ):
							_UpperCAmelCase      :							Any       =   {0: """batch""", 2: """past_sequence + sequence"""}
							_UpperCAmelCase      :							Dict       =   {0: """batch""", 2: """past_sequence + sequence"""}
				else:
					_UpperCAmelCase      :							List[Any]       =   OrderedDict(
					    [
					        ("""input_ids""", {0: """batch""", 1: """encoder_sequence"""}),
					        ("""attention_mask""", {0: """batch""", 1: """encoder_sequence"""}),
					        ("""decoder_input_ids""", {0: """batch""", 1: """decoder_sequence"""}),
					        ("""decoder_attention_mask""", {0: """batch""", 1: """decoder_sequence"""}),
					    ]       )

				return common_inputs
			@property
			# Copied from transformers.models.bart.configuration_bart.BartOnnxConfig.outputs
			def 							__snake_case	(						self       )      ->      Mapping[str, Mapping[int, str]]:






				'''simple docstring'''







				if self.task in ["default", "seq2seq-lm"]:
					_UpperCAmelCase      :							Optional[Any]       =   super().outputs
				else:
					_UpperCAmelCase      :							Optional[int]       =   super(_A ,						self       ).outputs
					if self.use_past:
						_UpperCAmelCase  ,				_UpperCAmelCase      :							int       =   self.num_layers
						for i in range(_A       ):
							_UpperCAmelCase      :							Tuple       =   {0: """batch""", 2: """past_sequence + sequence"""}
							_UpperCAmelCase      :							Optional[Any]       =   {0: """batch""", 2: """past_sequence + sequence"""}
				return common_outputs
			def 							__snake_case	(						self ,						_A ,						_A = -1 ,						_A = -1 ,						_A = False ,						_A = None ,						)      ->      Mapping[str, Any]:






				'''simple docstring'''







				_UpperCAmelCase      :							Dict       =   self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
				    _A ,						_A ,						_A ,						_A ,						_A       )
				# Generate decoder inputs
				_UpperCAmelCase      :							Any       =   seq_length if not self.use_past else 1
				_UpperCAmelCase      :							List[str]       =   self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
				    _A ,						_A ,						_A ,						_A ,						_A       )
				_UpperCAmelCase      :							str       =   {f'''decoder_{name}''': tensor for name, tensor in decoder_inputs.items()}
				_UpperCAmelCase      :							Dict       =   dict(**_A ,						**_A       )

				if self.use_past:
					if not is_torch_available():
						raise ValueError("""Cannot generate dummy past_keys inputs without PyTorch installed."""       )
					else:
						import torch
					_UpperCAmelCase  ,				_UpperCAmelCase      :							Tuple       =   common_inputs["""input_ids"""].shape
					_UpperCAmelCase      :							List[Any]       =   common_inputs["""decoder_input_ids"""].shape[1]
					_UpperCAmelCase  ,				_UpperCAmelCase      :							List[str]       =   self.num_attention_heads
					_UpperCAmelCase      :							List[str]       =   (
					    batch,
					    num_encoder_attention_heads,
					    encoder_seq_length,
					    self._config.hidden_size // num_encoder_attention_heads,
					)
					_UpperCAmelCase      :							List[str]       =   decoder_seq_length
					_UpperCAmelCase      :							Tuple       =   (
					    batch,
					    num_decoder_attention_heads,
					    decoder_past_length,
					    self._config.hidden_size // num_decoder_attention_heads,
					)
					_UpperCAmelCase      :							Tuple       =   torch.cat(
					    [common_inputs["""decoder_attention_mask"""], torch.ones(_A ,						_A       )] ,						dim=1       )
					_UpperCAmelCase      :							Tuple       =   []
					_UpperCAmelCase  ,				_UpperCAmelCase      :							int       =   self.num_layers

					for _ in range(_A       ):
						common_inputs["past_key_values"].append(
						    (
						        torch.zeros(_A       ),
						        torch.zeros(_A       ),
						        torch.zeros(_A       ),
						        torch.zeros(_A       ),
						    )       )
				return common_inputs
			def 							__snake_case	(						self ,						_A ,						_A = -1 ,						_A = -1 ,						_A = False ,						_A = None ,						)      ->      Mapping[str, Any]:






				'''simple docstring'''







				_UpperCAmelCase      :							Union[str, Any]       =   self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
				    _A ,						_A ,						_A ,						_A ,						_A       )

				if self.use_past:
					if not is_torch_available():
						raise ValueError("""Cannot generate dummy past_keys inputs without PyTorch installed."""       )
					else:
						import torch
					_UpperCAmelCase  ,				_UpperCAmelCase      :							Any       =   common_inputs["""input_ids"""].shape
					_UpperCAmelCase      :							Union[str, Any]       =   seqlen
					_UpperCAmelCase  ,				_UpperCAmelCase      :							Optional[Any]       =   self.num_layers
					_UpperCAmelCase  ,				_UpperCAmelCase      :							Tuple       =   self.num_attention_heads
					_UpperCAmelCase      :							Optional[Any]       =   (
					    batch,
					    num_encoder_attention_heads,
					    past_key_values_length,
					    self._config.hidden_size // num_encoder_attention_heads,
					)
					_UpperCAmelCase      :							str       =   common_inputs["""attention_mask"""].dtype
					_UpperCAmelCase      :							Tuple       =   torch.cat(
					    [common_inputs["""attention_mask"""], torch.ones(_A ,						_A ,						dtype=_A       )] ,						dim=1       )
					_UpperCAmelCase      :							str       =   [
					    (torch.zeros(_A       ), torch.zeros(_A       )) for _ in range(_A       )
					]
				return common_inputs
			def 							__snake_case	(						self ,						_A ,						_A = -1 ,						_A = -1 ,						_A = False ,						_A = None ,						)      ->      Mapping[str, Any]:






				'''simple docstring'''







				_UpperCAmelCase      :							str       =   compute_effective_axis_dimension(
				    _A ,						fixed_dimension=OnnxConfig.default_fixed_batch ,						num_token_to_add=0       )

				# If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX
				_UpperCAmelCase      :							List[str]       =   tokenizer.num_special_tokens_to_add(_A       )
				_UpperCAmelCase      :							Tuple       =   compute_effective_axis_dimension(
				    _A ,						fixed_dimension=OnnxConfig.default_fixed_sequence ,						num_token_to_add=_A       )

				# Generate dummy inputs according to compute batch and sequence
				_UpperCAmelCase      :							str       =   [""" """.join([tokenizer.unk_token]       ) * seq_length] * batch_size
				_UpperCAmelCase      :							str       =   dict(tokenizer(_A ,						return_tensors=_A       )       )
				return common_inputs
			def 							__snake_case	(						self ,						_A ,						_A = -1 ,						_A = -1 ,						_A = False ,						_A = None ,						)      ->      Mapping[str, Any]:






				'''simple docstring'''







				if self.task in ["default", "seq2seq-lm"]:
					_UpperCAmelCase      :							Any       =   self._generate_dummy_inputs_for_default_and_seqaseq_lm(
					    _A ,						batch_size=_A ,						seq_length=_A ,						is_pair=_A ,						framework=_A       )

				elif self.task == "causal-lm":
					_UpperCAmelCase      :							int       =   self._generate_dummy_inputs_for_causal_lm(
					    _A ,						batch_size=_A ,						seq_length=_A ,						is_pair=_A ,						framework=_A       )
				else:
					_UpperCAmelCase      :							Tuple       =   self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
					    _A ,						batch_size=_A ,						seq_length=_A ,						is_pair=_A ,						framework=_A       )

				return common_inputs
			def 							__snake_case	(						self ,						_A ,						_A ,						_A ,						_A       )      ->      Optional[int]:






				'''simple docstring'''







				if self.task in ["default", "seq2seq-lm"]:
					_UpperCAmelCase      :							Union[str, Any]       =   super()._flatten_past_key_values_(_A ,						_A ,						_A ,						_A       )
				else:
					_UpperCAmelCase      :							Tuple       =   super(_A ,						self       )._flatten_past_key_values_(
					    _A ,						_A ,						_A ,						_A       )
			def 							__snake_case	(						self ,						_A ,						_A       )      ->      Optional[Any]:






				'''simple docstring'''







				if direction not in ["inputs", "outputs"]:
					raise ValueError(f'''direction must either be "inputs" or "outputs", but {direction} was given'''       )

				_UpperCAmelCase      :							Any       =   """past_key_values""" if direction == """inputs""" else """present"""
				_UpperCAmelCase  ,				_UpperCAmelCase      :							Any       =   self.num_layers

				_UpperCAmelCase      :							List[str]       =   """past_encoder_sequence"""
				_UpperCAmelCase      :							int       =   """past_decoder_sequence""" if direction == """inputs""" else """past_decoder_sequence + sequence"""

				for i in range(_A       ):
					_UpperCAmelCase      :							Union[str, Any]       =   {0: """batch""", 2: decoder_sequence}
					_UpperCAmelCase      :							Optional[int]       =   {0: """batch""", 2: decoder_sequence}
					_UpperCAmelCase      :							Tuple       =   {0: """batch""", 2: encoder_sequence}
					_UpperCAmelCase      :							Tuple       =   {0: """batch""", 2: encoder_sequence}





