



"""simple docstring"""
import argparse
import json

import torch

from diffusers import DDPMScheduler, LDMPipeline, UNetaDModel, VQModel



def        lowerCAmelCase_(   lowercase_     :							Optional[int]						,   lowercase_     :							int=1							)	->       int:





				if n_shave_prefix_segments >= 0:
								return ".".join(path.split('''.'''							)[n_shave_prefix_segments:]							)
				else:
								return ".".join(path.split('''.'''							)[:n_shave_prefix_segments]							)



def        lowerCAmelCase_(   lowercase_     :							Optional[Any]						,   lowercase_     :							Optional[int]=0							)	->       Union[str, Any]:
				_lowerCamelCase        =				[]
				for old_item in old_list:
								_lowerCamelCase        =				old_item.replace('''in_layers.0'''						,   '''norm1'''							)
								_lowerCamelCase        =				new_item.replace('''in_layers.2'''						,   '''conv1'''							)

								_lowerCamelCase        =				new_item.replace('''out_layers.0'''						,   '''norm2'''							)
								_lowerCamelCase        =				new_item.replace('''out_layers.3'''						,   '''conv2'''							)

								_lowerCamelCase        =				new_item.replace('''emb_layers.1'''						,   '''time_emb_proj'''							)
								_lowerCamelCase        =				new_item.replace('''skip_connection'''						,   '''conv_shortcut'''							)

								_lowerCamelCase        =				shave_segments(_lowerCamelCase						,   n_shave_prefix_segments=_lowerCamelCase							)

								mapping.append({'''old''': old_item, '''new''': new_item}							)

				return mapping



def        lowerCAmelCase_(   lowercase_     :							str						,   lowercase_     :							int=0							)	->       Dict:
				_lowerCamelCase        =				[]
				for old_item in old_list:
								_lowerCamelCase        =				old_item

								_lowerCamelCase        =				new_item.replace('''norm.weight'''						,   '''group_norm.weight'''							)
								_lowerCamelCase        =				new_item.replace('''norm.bias'''						,   '''group_norm.bias'''							)

								_lowerCamelCase        =				new_item.replace('''proj_out.weight'''						,   '''proj_attn.weight'''							)
								_lowerCamelCase        =				new_item.replace('''proj_out.bias'''						,   '''proj_attn.bias'''							)

								_lowerCamelCase        =				shave_segments(_lowerCamelCase						,   n_shave_prefix_segments=_lowerCamelCase							)

								mapping.append({'''old''': old_item, '''new''': new_item}							)

				return mapping



def        lowerCAmelCase_(   lowercase_     :							str						,   lowercase_     :							List[str]						,   lowercase_     :							Tuple						,   lowercase_     :							Dict=None						,   lowercase_     :							int=None						,   lowercase_     :							str=None							)	->       List[Any]:
				assert isinstance(_lowerCamelCase						,   _lowerCamelCase							), "Paths should be a list of dicts containing 'old' and 'new' keys."

				# Splits the attention layers into three variables.
				if attention_paths_to_split is not None:
								for path, path_map in attention_paths_to_split.items():
												_lowerCamelCase        =				old_checkpoint[path]
												_lowerCamelCase        =				old_tensor.shape[0] // 3

												_lowerCamelCase        =				(-1, channels) if len(old_tensor.shape							) == 3 else (-1)

												_lowerCamelCase        =				old_tensor.shape[0] // config["num_head_channels"] // 3

												_lowerCamelCase        =				old_tensor.reshape((num_heads, 3 * channels // num_heads) + old_tensor.shape[1:]							)
												_lowerCamelCase        =				old_tensor.split(channels // num_heads						,   dim=1							)

												_lowerCamelCase        =				query.reshape(_lowerCamelCase							)
												_lowerCamelCase        =				key.reshape(_lowerCamelCase							)
												_lowerCamelCase        =				value.reshape(_lowerCamelCase							)

				for path in paths:
								_lowerCamelCase        =				path["new"]

								# These have already been assigned
								if attention_paths_to_split is not None and new_path in attention_paths_to_split:
												continue

								# Global renaming happens here
								_lowerCamelCase        =				new_path.replace('''middle_block.0'''						,   '''mid_block.resnets.0'''							)
								_lowerCamelCase        =				new_path.replace('''middle_block.1'''						,   '''mid_block.attentions.0'''							)
								_lowerCamelCase        =				new_path.replace('''middle_block.2'''						,   '''mid_block.resnets.1'''							)

								if additional_replacements is not None:
												for replacement in additional_replacements:
																_lowerCamelCase        =				new_path.replace(replacement['''old''']						,   replacement['''new''']							)

        # proj_attn.weight has to be converted from conv 1D to linear
								if "proj_attn.weight" in new_path:
												_lowerCamelCase        =				old_checkpoint[path["old"]][:, :, 0]
								else:
												_lowerCamelCase        =				old_checkpoint[path["old"]]



def        lowerCAmelCase_(   lowercase_     :							str						,   lowercase_     :							Optional[Any]							)	->       str:
				_lowerCamelCase        =				{}

				_lowerCamelCase        =				checkpoint["time_embed.0.weight"]
				_lowerCamelCase        =				checkpoint["time_embed.0.bias"]
				_lowerCamelCase        =				checkpoint["time_embed.2.weight"]
				_lowerCamelCase        =				checkpoint["time_embed.2.bias"]

				_lowerCamelCase        =				checkpoint["input_blocks.0.0.weight"]
				_lowerCamelCase        =				checkpoint["input_blocks.0.0.bias"]

				_lowerCamelCase        =				checkpoint["out.0.weight"]
				_lowerCamelCase        =				checkpoint["out.0.bias"]
				_lowerCamelCase        =				checkpoint["out.2.weight"]
				_lowerCamelCase        =				checkpoint["out.2.bias"]

				# Retrieves the keys for the input blocks only
				_lowerCamelCase        =				len({'''.'''.join(layer.split('''.'''							)[:2]							) for layer in checkpoint if '''input_blocks''' in layer}							)
				_lowerCamelCase        =				{
				    layer_id: [key for key in checkpoint if F"""input_blocks.{layer_id}""" in key]
				    for layer_id in range(_lowerCamelCase							)
				}

				# Retrieves the keys for the middle blocks only
				_lowerCamelCase        =				len({'''.'''.join(layer.split('''.'''							)[:2]							) for layer in checkpoint if '''middle_block''' in layer}							)
				_lowerCamelCase        =				{
				    layer_id: [key for key in checkpoint if F"""middle_block.{layer_id}""" in key]
				    for layer_id in range(_lowerCamelCase							)
				}

				# Retrieves the keys for the output blocks only
				_lowerCamelCase        =				len({'''.'''.join(layer.split('''.'''							)[:2]							) for layer in checkpoint if '''output_blocks''' in layer}							)
				_lowerCamelCase        =				{
				    layer_id: [key for key in checkpoint if F"""output_blocks.{layer_id}""" in key]
				    for layer_id in range(_lowerCamelCase							)
				}

				for i in range(1						,   _lowerCamelCase							):
								_lowerCamelCase        =				(i - 1) // (config["num_res_blocks"] + 1)
								_lowerCamelCase        =				(i - 1) % (config["num_res_blocks"] + 1)

								_lowerCamelCase        =				[key for key in input_blocks[i] if F"""input_blocks.{i}.0""" in key]
								_lowerCamelCase        =				[key for key in input_blocks[i] if F"""input_blocks.{i}.1""" in key]

								if F"""input_blocks.{i}.0.op.weight""" in checkpoint:
												_lowerCamelCase        =				checkpoint[
												    F"""input_blocks.{i}.0.op.weight"""
												]
												_lowerCamelCase        =				checkpoint[
												    F"""input_blocks.{i}.0.op.bias"""
												]
												continue

								_lowerCamelCase        =				renew_resnet_paths(_lowerCamelCase							)
								_lowerCamelCase        =				{"old": F"""input_blocks.{i}.0""", "new": F"""down_blocks.{block_id}.resnets.{layer_in_block_id}"""}
								_lowerCamelCase        =				{"old": "resnets.2.op", "new": "downsamplers.0.op"}
								assign_to_checkpoint(
								    _lowerCamelCase						,   _lowerCamelCase						,   _lowerCamelCase						,   additional_replacements=[meta_path, resnet_op]						,   config=_lowerCamelCase							)

								if len(_lowerCamelCase							):
												_lowerCamelCase        =				renew_attention_paths(_lowerCamelCase							)
												_lowerCamelCase        =				{
												    "old": F"""input_blocks.{i}.1""",
												    "new": F"""down_blocks.{block_id}.attentions.{layer_in_block_id}""",
												}
												_lowerCamelCase        =				{
												    F"""input_blocks.{i}.1.qkv.bias""": {
												        "key": F"""down_blocks.{block_id}.attentions.{layer_in_block_id}.key.bias""",
												        "query": F"""down_blocks.{block_id}.attentions.{layer_in_block_id}.query.bias""",
												        "value": F"""down_blocks.{block_id}.attentions.{layer_in_block_id}.value.bias""",
												    },
												    F"""input_blocks.{i}.1.qkv.weight""": {
												        "key": F"""down_blocks.{block_id}.attentions.{layer_in_block_id}.key.weight""",
												        "query": F"""down_blocks.{block_id}.attentions.{layer_in_block_id}.query.weight""",
												        "value": F"""down_blocks.{block_id}.attentions.{layer_in_block_id}.value.weight""",
												    },
												}
												assign_to_checkpoint(
												    _lowerCamelCase						,   _lowerCamelCase						,   _lowerCamelCase						,   additional_replacements=[meta_path]						,   attention_paths_to_split=_lowerCamelCase						,   config=_lowerCamelCase						,   )

				_lowerCamelCase        =				middle_blocks[0]
				_lowerCamelCase        =				middle_blocks[1]
				_lowerCamelCase        =				middle_blocks[2]

				_lowerCamelCase        =				renew_resnet_paths(_lowerCamelCase							)
				assign_to_checkpoint(_lowerCamelCase						,   _lowerCamelCase						,   _lowerCamelCase						,   config=_lowerCamelCase							)

				_lowerCamelCase        =				renew_resnet_paths(_lowerCamelCase							)
				assign_to_checkpoint(_lowerCamelCase						,   _lowerCamelCase						,   _lowerCamelCase						,   config=_lowerCamelCase							)

				_lowerCamelCase        =				renew_attention_paths(_lowerCamelCase							)
				_lowerCamelCase        =				{
				    "middle_block.1.qkv.bias": {
				        "key": "mid_block.attentions.0.key.bias",
				        "query": "mid_block.attentions.0.query.bias",
				        "value": "mid_block.attentions.0.value.bias",
				    },
				    "middle_block.1.qkv.weight": {
				        "key": "mid_block.attentions.0.key.weight",
				        "query": "mid_block.attentions.0.query.weight",
				        "value": "mid_block.attentions.0.value.weight",
				    },
				}
				assign_to_checkpoint(
				    _lowerCamelCase						,   _lowerCamelCase						,   _lowerCamelCase						,   attention_paths_to_split=_lowerCamelCase						,   config=_lowerCamelCase							)

				for i in range(_lowerCamelCase							):
								_lowerCamelCase        =				i // (config["num_res_blocks"] + 1)
								_lowerCamelCase        =				i % (config["num_res_blocks"] + 1)
								_lowerCamelCase        =				[shave_segments(_lowerCamelCase						,   2							) for name in output_blocks[i]]
								_lowerCamelCase        =				{}

								for layer in output_block_layers:
												_lowerCamelCase        =				layer.split('''.'''							)[0], shave_segments(_lowerCamelCase						,   1							)
												if layer_id in output_block_list:
																output_block_list[layer_id].append(_lowerCamelCase							)
												else:
																_lowerCamelCase        =				[layer_name]

								if len(_lowerCamelCase							) > 1:
												_lowerCamelCase        =				[key for key in output_blocks[i] if F"""output_blocks.{i}.0""" in key]
												_lowerCamelCase        =				[key for key in output_blocks[i] if F"""output_blocks.{i}.1""" in key]

												_lowerCamelCase        =				renew_resnet_paths(_lowerCamelCase							)
												_lowerCamelCase        =				renew_resnet_paths(_lowerCamelCase							)

												_lowerCamelCase        =				{"old": F"""output_blocks.{i}.0""", "new": F"""up_blocks.{block_id}.resnets.{layer_in_block_id}"""}
												assign_to_checkpoint(_lowerCamelCase						,   _lowerCamelCase						,   _lowerCamelCase						,   additional_replacements=[meta_path]						,   config=_lowerCamelCase							)

												if ["conv.weight", "conv.bias"] in output_block_list.values():
																_lowerCamelCase        =				list(output_block_list.values()							).index(['''conv.weight''', '''conv.bias''']							)
																_lowerCamelCase        =				checkpoint[
																    F"""output_blocks.{i}.{index}.conv.weight"""
																]
																_lowerCamelCase        =				checkpoint[
																    F"""output_blocks.{i}.{index}.conv.bias"""
																]

																# Clear attentions as they have been attributed above.
																if len(_lowerCamelCase							) == 2:
																				_lowerCamelCase        =				[]

												if len(_lowerCamelCase							):
																_lowerCamelCase        =				renew_attention_paths(_lowerCamelCase							)
																_lowerCamelCase        =				{
																    "old": F"""output_blocks.{i}.1""",
																    "new": F"""up_blocks.{block_id}.attentions.{layer_in_block_id}""",
																}
																_lowerCamelCase        =				{
																    F"""output_blocks.{i}.1.qkv.bias""": {
																        "key": F"""up_blocks.{block_id}.attentions.{layer_in_block_id}.key.bias""",
																        "query": F"""up_blocks.{block_id}.attentions.{layer_in_block_id}.query.bias""",
																        "value": F"""up_blocks.{block_id}.attentions.{layer_in_block_id}.value.bias""",
																    },
																    F"""output_blocks.{i}.1.qkv.weight""": {
																        "key": F"""up_blocks.{block_id}.attentions.{layer_in_block_id}.key.weight""",
																        "query": F"""up_blocks.{block_id}.attentions.{layer_in_block_id}.query.weight""",
																        "value": F"""up_blocks.{block_id}.attentions.{layer_in_block_id}.value.weight""",
																    },
																}
																assign_to_checkpoint(
																    _lowerCamelCase						,   _lowerCamelCase						,   _lowerCamelCase						,   additional_replacements=[meta_path]						,   attention_paths_to_split=to_split if any('''qkv''' in key for key in attentions							) else None						,   config=_lowerCamelCase						,   )
								else:
												_lowerCamelCase        =				renew_resnet_paths(_lowerCamelCase						,   n_shave_prefix_segments=1							)
												for path in resnet_0_paths:
																_lowerCamelCase        =				".".join(['''output_blocks''', str(_lowerCamelCase							), path['''old''']]							)
																_lowerCamelCase        =				".".join(['''up_blocks''', str(_lowerCamelCase							), '''resnets''', str(_lowerCamelCase							), path['''new''']]							)

																_lowerCamelCase        =				checkpoint[old_path]

				return new_checkpoint


if __name__ == "__main__":
			__SCREAMING_SNAKE_CASE  :						Union[str, Any]    							=      argparse.ArgumentParser()

			parser.add_argument(
			    '''--checkpoint_path''', default=None, type=str, required=True, help='''Path to the checkpoint to convert.'''
			)

			parser.add_argument(
			    '''--config_file''',
			    default=None,
			    type=str,
			    required=True,
			    help='''The config json file corresponding to the architecture.''',
			)

			parser.add_argument('''--dump_path''', default=None, type=str, required=True, help='''Path to the output model.''')

			__SCREAMING_SNAKE_CASE  :						Union[str, Any]    							=      parser.parse_args()

			__SCREAMING_SNAKE_CASE  :						Tuple    							=      torch.load(args.checkpoint_path)

			with open(args.config_file) as f:
						__SCREAMING_SNAKE_CASE  :						Union[str, Any]    							=      json.loads(f.read())

			__SCREAMING_SNAKE_CASE  :						Any    							=      convert_ldm_checkpoint(checkpoint, config)

			if "ldm" in config:
						del config["ldm"]

			__SCREAMING_SNAKE_CASE  :						Union[str, Any]    							=      UNetaDModel(**config)
			model.load_state_dict(converted_checkpoint)

			try:
						__SCREAMING_SNAKE_CASE  :						Tuple    							=      DDPMScheduler.from_config('''/'''.join(args.checkpoint_path.split('''/''')[:-1]))
						__SCREAMING_SNAKE_CASE  :						List[str]    							=      VQModel.from_pretrained('''/'''.join(args.checkpoint_path.split('''/''')[:-1]))

						__SCREAMING_SNAKE_CASE  :						Any    							=      LDMPipeline(unet=model, scheduler=scheduler, vae=vqvae)
						pipe.save_pretrained(args.dump_path)
			except:  # noqa: E722
						model.save_pretrained(args.dump_path)











"""simple docstring"""
import unittest

from transformers import BigBirdConfig, is_flax_available
from transformers.testing_utils import require_flax, slow

from ...test_modeling_flax_common import FlaxModelTesterMixin, ids_tensor, random_attention_mask


if is_flax_available():
			import jax

			from transformers.models.big_bird.modeling_flax_big_bird import (
			    FlaxBigBirdForCausalLM,
			    FlaxBigBirdForMaskedLM,
			    FlaxBigBirdForMultipleChoice,
			    FlaxBigBirdForPreTraining,
			    FlaxBigBirdForQuestionAnswering,
			    FlaxBigBirdForSequenceClassification,
			    FlaxBigBirdForTokenClassification,
			    FlaxBigBirdModel,
			)


class 							lowerCamelCase_(   unittest.TestCase    ):





					'''simple docstring'''



					def __init__(    self				,       lowerCamelCase__				,       lowerCamelCase__=2				,       lowerCamelCase__=5_6				,       lowerCamelCase__=True				,       lowerCamelCase__=True				,       lowerCamelCase__=True				,       lowerCamelCase__=True				,       lowerCamelCase__=9_9				,       lowerCamelCase__=3_2				,       lowerCamelCase__=2				,       lowerCamelCase__=2				,       lowerCamelCase__=7				,       lowerCamelCase__="gelu_new"				,       lowerCamelCase__=0.1				,       lowerCamelCase__=0.1				,       lowerCamelCase__=5_1_2				,       lowerCamelCase__=1_6				,       lowerCamelCase__=2				,       lowerCamelCase__=0.0_2				,       lowerCamelCase__=4				,       lowerCamelCase__="block_sparse"				,       lowerCamelCase__=True				,       lowerCamelCase__=False				,       lowerCamelCase__=2				,       lowerCamelCase__=3				,       ):
									_lowerCamelCase        =				parent
									_lowerCamelCase        =				batch_size
									_lowerCamelCase        =				seq_length
									_lowerCamelCase        =				is_training
									_lowerCamelCase        =				use_attention_mask
									_lowerCamelCase        =				use_token_type_ids
									_lowerCamelCase        =				use_labels
									_lowerCamelCase        =				vocab_size
									_lowerCamelCase        =				hidden_size
									_lowerCamelCase        =				num_hidden_layers
									_lowerCamelCase        =				num_attention_heads
									_lowerCamelCase        =				intermediate_size
									_lowerCamelCase        =				hidden_act
									_lowerCamelCase        =				hidden_dropout_prob
									_lowerCamelCase        =				attention_probs_dropout_prob
									_lowerCamelCase        =				max_position_embeddings
									_lowerCamelCase        =				type_vocab_size
									_lowerCamelCase        =				type_sequence_label_size
									_lowerCamelCase        =				initializer_range
									_lowerCamelCase        =				num_choices

									_lowerCamelCase        =				rescale_embeddings
									_lowerCamelCase        =				attention_type
									_lowerCamelCase        =				use_bias
									_lowerCamelCase        =				block_size
									_lowerCamelCase        =				num_random_blocks

					def 			snake_case__      (    self   ):
									_lowerCamelCase        =				ids_tensor([self.batch_size, self.seq_length]				,       self.vocab_size   )

									_lowerCamelCase        =				None
									if self.use_attention_mask:
													_lowerCamelCase        =				random_attention_mask([self.batch_size, self.seq_length]   )

									_lowerCamelCase        =				None
									if self.use_token_type_ids:
													_lowerCamelCase        =				ids_tensor([self.batch_size, self.seq_length]				,       self.type_vocab_size   )

									_lowerCamelCase        =				BigBirdConfig(
									    vocab_size=self.vocab_size				,       hidden_size=self.hidden_size				,       num_hidden_layers=self.num_hidden_layers				,       num_attention_heads=self.num_attention_heads				,       intermediate_size=self.intermediate_size				,       hidden_act=self.hidden_act				,       hidden_dropout_prob=self.hidden_dropout_prob				,       attention_probs_dropout_prob=self.attention_probs_dropout_prob				,       max_position_embeddings=self.max_position_embeddings				,       type_vocab_size=self.type_vocab_size				,       is_decoder=lowerCamelCase__				,       initializer_range=self.initializer_range				,       attention_type=self.attention_type				,       block_size=self.block_size				,       num_random_blocks=self.num_random_blocks				,       use_bias=self.use_bias				,       rescale_embeddings=self.rescale_embeddings				,       )

									return config, input_ids, token_type_ids, attention_mask





					def 			snake_case__      (    self   ):
									_lowerCamelCase        =				self.prepare_config_and_inputs()
									_lowerCamelCase  ,     _lowerCamelCase  ,     _lowerCamelCase  ,     _lowerCamelCase        =				config_and_inputs
									_lowerCamelCase        =				{
									    '''input_ids''': input_ids,
									    '''token_type_ids''': token_type_ids,
									    '''attention_mask''': attention_mask,
									}
									return config, inputs_dict


@require_flax
class 							lowerCamelCase_(   A__,				unittest.TestCase    ):





					'''simple docstring'''



					lowercase__   :       List[str]										= (
					    (
					        FlaxBigBirdForCausalLM,
					        FlaxBigBirdModel,
					        FlaxBigBirdForPreTraining,
					        FlaxBigBirdForMaskedLM,
					        FlaxBigBirdForMultipleChoice,
					        FlaxBigBirdForQuestionAnswering,
					        FlaxBigBirdForSequenceClassification,
					        FlaxBigBirdForTokenClassification,
					    )
					    if is_flax_available()
					    else ()
					)

					lowercase__   :       Any										= False
					lowercase__   :       Optional[int]										= False

					def 			snake_case__      (    self   ):
									_lowerCamelCase        =				FlaxBigBirdModelTester(self   )

					@slow
					# copied from `test_modeling_flax_common` because it takes much longer than other models
					def 			snake_case__      (    self   ):
									super().test_from_pretrained_save_pretrained()

					@slow
					# copied from `test_modeling_flax_common` because it takes much longer than other models
					def 			snake_case__      (    self   ):
									super().test_from_pretrained_with_no_automatic_init()

					@slow
					# copied from `test_modeling_flax_common` because it takes much longer than other models
					def 			snake_case__      (    self   ):
									super().test_no_automatic_init()

					@slow
					# copied from `test_modeling_flax_common` because it takes much longer than other models
					def 			snake_case__      (    self   ):
									super().test_hidden_states_output()

					@slow
					def 			snake_case__      (    self   ):
									for model_class_name in self.all_model_classes:
													_lowerCamelCase        =				model_class_name.from_pretrained('''google/bigbird-roberta-base'''   )
													self.assertIsNotNone(lowerCamelCase__   )

					def 			snake_case__      (    self   ):
									if self.test_attn_probs:
													super().test_attention_outputs()

					@slow
					# copied from `test_modeling_flax_common` because it takes much longer than other models
					def 			snake_case__      (    self   ):
									_lowerCamelCase  ,     _lowerCamelCase        =				self.model_tester.prepare_config_and_inputs_for_common()

									for model_class in self.all_model_classes:
													with self.subTest(model_class.__name__   ):
																	_lowerCamelCase        =				self._prepare_for_class(lowerCamelCase__				,       lowerCamelCase__   )
																	_lowerCamelCase        =				model_class(lowerCamelCase__   )

																	@jax.jit
																	def model_jitted(lowerCamelCase__				,       lowerCamelCase__=None				,       **lowerCamelCase__   ):
																					return model(input_ids=lowerCamelCase__				,       attention_mask=lowerCamelCase__				,       **lowerCamelCase__   )

																	with self.subTest('''JIT Enabled'''   ):
																					_lowerCamelCase        =				model_jitted(**lowerCamelCase__   ).to_tuple()

																	with self.subTest('''JIT Disabled'''   ):
																					with jax.disable_jit():
																									_lowerCamelCase        =				model_jitted(**lowerCamelCase__   ).to_tuple()

																	self.assertEqual(len(lowerCamelCase__   )				,       len(lowerCamelCase__   )   )
																	for jitted_output, output in zip(lowerCamelCase__				,       lowerCamelCase__   ):
																					self.assertEqual(jitted_output.shape				,       output.shape   )





					def 			snake_case__      (    self				,       lowerCamelCase__				,       lowerCamelCase__				,       lowerCamelCase__				,       lowerCamelCase__=1e-5				,       lowerCamelCase__="outputs"				,       lowerCamelCase__=None   ):
									# `bigbird_block_sparse_attention` in `FlaxBigBird` returns `attention_probs = None`, while in PyTorch version,
									# an effort was done to return `attention_probs` (yet to be verified).
									if name.startswith('''outputs.attentions'''   ):
													return
									else:
													super().check_pt_flax_outputs(lowerCamelCase__				,       lowerCamelCase__				,       lowerCamelCase__				,       lowerCamelCase__				,       lowerCamelCase__				,       lowerCamelCase__   )
