

import math

def    A_  (							a					,   a  ):

      """simple docstring"""



      if 0 not in (x, y):
            # We use the relation x^y = y*log10(x), where 10 is the base.
            return y * math.logaa(a  )
      else:
            if x == 0:  # 0 raised to any number is 0
                  return 0
            elif y == 0:
                  return 1  # any number raised to 0 is 1
      raise AssertionError('This should never happen'  )


if __name__ == "__main__":  # Main function
    # Read two numbers from input and typecast them to int using map function.
    # Here x is the base and y is the power.
    lowerCAmelCase     :   int						     =  'Enter the base and the power separated by a comma: '
    lowerCAmelCase     :   Tuple						     =  map(int, input(prompt).split(','))
    lowerCAmelCase     :   int						     =  map(int, input(prompt).split(','))

    # We find the log of each number, using the function res(), which takes two
    # arguments.
    lowerCAmelCase     :   List[Any]						     =  res(xa, ya)
    lowerCAmelCase     :   List[Any]						     =  res(xa, ya)

    # We check for the largest number
    if resa > resa:
        print('Largest number is', xa, '^', ya)
    elif resa > resa:
        print('Largest number is', xa, '^', ya)
    else:
        print('Both are equal')









import unittest

from transformers import is_torch_available, is_vision_available
from transformers.testing_utils import require_torch, require_vision, slow, torch_device


if is_torch_available():
    import torch

    from transformers import AutoModelForImageClassification

if is_vision_available():
    from transformers import AutoImageProcessor
@require_torch
@require_vision
class  _A		(  unittest.TestCase):

  @slow
  def  UpperCAmelCase    (				self					):





        """simple docstring"""







        SCREAMING_SNAKE_CASE_				:  List[str]           =     AutoImageProcessor.from_pretrained('microsoft/dit-base-finetuned-rvlcdip'					)
        SCREAMING_SNAKE_CASE_				:  Any           =     AutoModelForImageClassification.from_pretrained('microsoft/dit-base-finetuned-rvlcdip'					)
        model.to(_SCREAMING_SNAKE_CASE					)

        from datasets import load_dataset

        SCREAMING_SNAKE_CASE_				:  str           =     load_dataset('nielsr/rvlcdip-demo'					)

        SCREAMING_SNAKE_CASE_				:  List[Any]           =     dataset['train'][0]['image'].convert('RGB'					)

        SCREAMING_SNAKE_CASE_				:  List[Any]           =     image_processor(_SCREAMING_SNAKE_CASE ,					return_tensors='pt'					).to(_SCREAMING_SNAKE_CASE					)

        # forward pass
        with torch.no_grad():
              SCREAMING_SNAKE_CASE_				:  int           =     model(**_SCREAMING_SNAKE_CASE					)
              SCREAMING_SNAKE_CASE_				:  Any           =     outputs.logits

        SCREAMING_SNAKE_CASE_				:  Optional[int]           =     torch.Size((1, 16)					)
        self.assertEqual(logits.shape ,					_SCREAMING_SNAKE_CASE					)

        SCREAMING_SNAKE_CASE_				:  List[str]           =     torch.tensor(
            [-0.4158, -0.4092, -0.4347] ,					device=_SCREAMING_SNAKE_CASE ,					dtype=torch.float ,					)
        self.assertTrue(torch.allclose(logits[0, :3] ,					_SCREAMING_SNAKE_CASE ,					atol=1e-4					)					)






