
"""simple docstring"""

import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import CONFIG_MAPPING


SCREAMING_SNAKE_CASE_    					=						logging.get_logger(__name__)
class      _UpperCAmelCase							(		SCREAMING_SNAKE_CASE_							):
						__SCREAMING_SNAKE_CASE   :							List[str]							      =	"upernet"




						def __init__(							self   ,       lowercase_=None   ,       lowercase_=5_1_2   ,       lowercase_=0.0_2   ,       lowercase_=[1, 2, 3, 6]   ,       lowercase_=True   ,       lowercase_=0.4   ,       lowercase_=3_8_4   ,       lowercase_=2_5_6   ,       lowercase_=1   ,       lowercase_=False   ,       lowercase_=2_5_5   ,       **lowercase_   ,       )						->					Tuple:
										super().__init__(**lowercase_							)

										if backbone_config is None:
														logger.info('`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.'							)
														UpperCAmelCase									=					CONFIG_MAPPING['resnet'](out_features=['stage1', 'stage2', 'stage3', 'stage4']							)
										elif isinstance(lowercase_   ,       lowercase_							):
														UpperCAmelCase									=					backbone_config.get('model_type'							)
														UpperCAmelCase									=					CONFIG_MAPPING[backbone_model_type]
														UpperCAmelCase									=					config_class.from_dict(lowercase_							)

										UpperCAmelCase									=					backbone_config
										UpperCAmelCase									=					hidden_size
										UpperCAmelCase									=					initializer_range
										UpperCAmelCase									=					pool_scales
										UpperCAmelCase									=					use_auxiliary_head
										UpperCAmelCase									=					auxiliary_loss_weight
										UpperCAmelCase									=					auxiliary_in_channels
										UpperCAmelCase									=					auxiliary_channels
										UpperCAmelCase									=					auxiliary_num_convs
										UpperCAmelCase									=					auxiliary_concat_input
										UpperCAmelCase									=					loss_ignore_index




						def     a_      (							self							)						->					int:
										UpperCAmelCase									=					copy.deepcopy(self.__dict__							)
										UpperCAmelCase									=					self.backbone_config.to_dict()
										UpperCAmelCase									=					self.__class__.model_type
										return output





"""simple docstring"""

def     lowercase__						(					lowerCAmelCase				:					int ,				lowerCAmelCase				:					int ) ->      int:






    """simple docstring"""




    return int((input_a, input_a).count(0 ) == 0 )




def     lowercase__						(					) ->      None:






    """simple docstring"""




    assert and_gate(0 ,				0 ) == 0
    assert and_gate(0 ,				1 ) == 0
    assert and_gate(1 ,				0 ) == 0
    assert and_gate(1 ,				1 ) == 1


if __name__ == "__main__":
   test_and_gate()
   print(and_gate(1, 0))
   print(and_gate(0, 0))
   print(and_gate(0, 1))
   print(and_gate(1, 1))



