



"""simple docstring"""




import colorsys
import io

import cva
import matplotlib as mpl
import matplotlib.colors as mplc
import matplotlib.figure as mplfigure
import numpy as np
import torch
from matplotlib.backends.backend_agg import FigureCanvasAgg

from utils import img_tensorize


a__      =		10_00







class 						snake_case  :



   '''simple docstring'''






   def __init__(   self							:     Dict			,						lowerCAmelCase							:     Union[str, Any]			,						lowerCAmelCase							:     Any=1.2			,						lowerCAmelCase							:     Any="g"			,						lowerCAmelCase							:     List[str]=0.5			,						lowerCAmelCase							:     Any="-"			,						lowerCAmelCase							:     Tuple="test_out.jpg"			,						lowerCAmelCase							:     Tuple=True			,						lowerCAmelCase							:     Tuple=False			,						lowerCAmelCase							:     Tuple=None			,						lowerCAmelCase							:     Optional[int]=None			,						lowerCAmelCase							:     List[str]=0.7			,						)			->			Optional[int]:

    """simple docstring"""







    if isinstance(lowerCAmelCase			,						torch.Tensor):
     _snake_case      :					str					=   img.numpy().astype("""np.uint8""")
    if isinstance(lowerCAmelCase			,						lowerCAmelCase):
     _snake_case      :					int					=   img_tensorize(lowerCAmelCase)
    assert isinstance(lowerCAmelCase			,						np.ndarray)

    _snake_case      :					Any					=   img.shape[1], img.shape[0]
    _snake_case      :					Tuple					=   mplfigure.Figure(frameon=lowerCAmelCase)
    _snake_case      :					Tuple					=   fig.get_dpi()
    _snake_case      :					Union[str, Any]					=   (width * scale + 1E-2) / dpi
    _snake_case      :					Any					=   (height * scale + 1E-2) / dpi
    fig.set_size_inches(lowerCAmelCase			,						lowerCAmelCase)
    _snake_case      :					Optional[Any]					=   fig.add_axes([0.0, 0.0, 1.0, 1.0])
    ax.axis("""off""")
    ax.set_xlim(0.0			,						lowerCAmelCase)
    ax.set_ylim(lowerCAmelCase)

    _snake_case      :					Union[str, Any]					=   saveas
    _snake_case      :					Union[str, Any]					=   rgb
    _snake_case      :					Optional[Any]					=   pynb
    _snake_case      :					Optional[Any]					=   img
    _snake_case      :					Tuple					=   edgecolor
    _snake_case      :					List[str]					=   0.5
    _snake_case      :					Optional[int]					=   linestyle
    _snake_case      :					Optional[int]					=   int(np.sqrt(min(lowerCAmelCase			,						lowerCAmelCase)) * scale // 3)
    _snake_case      :					Tuple					=   width
    _snake_case      :					Optional[int]					=   height
    _snake_case      :					Optional[Any]					=   scale
    _snake_case      :					int					=   fig
    _snake_case      :					str					=   ax
    _snake_case      :					Any					=   pad
    _snake_case      :					Tuple					=   idaobj
    _snake_case      :					Dict					=   idaattr
    _snake_case      :					int					=   FigureCanvasAgg(lowerCAmelCase)

   def        UpperCamelCase_					(   self							:     Optional[Any]			,						lowerCAmelCase							:     Dict			,						lowerCAmelCase							:     Optional[int]=None)			->			str:

    """simple docstring"""







    if color is None:
     _snake_case      :					Optional[int]					=   self.edgecolor
    (_snake_case)      :					Any					=   box
    _snake_case      :					Optional[Any]					=   xa - xa
    _snake_case      :					str					=   ya - ya
    self.ax.add_patch(
        mpl.patches.Rectangle(
            (xa, ya)			,						lowerCAmelCase			,						lowerCAmelCase			,						fill=lowerCAmelCase			,						edgecolor=lowerCAmelCase			,						linewidth=self.font_size // 3			,						alpha=self.alpha			,						linestyle=self.linestyle			,						))

   def        UpperCamelCase_					(   self							:     Union[str, Any]			,						lowerCAmelCase							:     Tuple			,						lowerCAmelCase							:     Optional[int]=None			,						lowerCAmelCase							:     Any=None			,						lowerCAmelCase							:     int=None			,						lowerCAmelCase							:     str=None)			->			List[str]:

    """simple docstring"""







    if len(boxes.shape) > 2:
     _snake_case      :					List[str]					=   boxes[0]
    if len(obj_ids.shape) > 1:
     _snake_case      :					List[str]					=   obj_ids[0]
    if len(obj_scores.shape) > 1:
     _snake_case      :					int					=   obj_scores[0]
    if len(attr_ids.shape) > 1:
     _snake_case      :					Optional[Any]					=   attr_ids[0]
    if len(attr_scores.shape) > 1:
     _snake_case      :					Any					=   attr_scores[0]
    if isinstance(lowerCAmelCase			,						torch.Tensor):
     _snake_case      :					str					=   boxes.numpy()
    if isinstance(lowerCAmelCase			,						lowerCAmelCase):
     _snake_case      :					List[Any]					=   np.array(lowerCAmelCase)
    assert isinstance(lowerCAmelCase			,						np.ndarray)
    _snake_case      :					Optional[int]					=   np.prod(boxes[:, 2:] - boxes[:, :2]			,						axis=1)
    _snake_case      :					str					=   np.argsort(-areas).tolist()
    _snake_case      :					Union[str, Any]					=   boxes[sorted_idxs] if boxes is not None else None
    _snake_case      :					Optional[Any]					=   obj_ids[sorted_idxs] if obj_ids is not None else None
    _snake_case      :					Union[str, Any]					=   obj_scores[sorted_idxs] if obj_scores is not None else None
    _snake_case      :					int					=   attr_ids[sorted_idxs] if attr_ids is not None else None
    _snake_case      :					Union[str, Any]					=   attr_scores[sorted_idxs] if attr_scores is not None else None

    _snake_case      :					Optional[Any]					=   [self._random_color(maximum=1) for _ in range(len(lowerCAmelCase))]
    _snake_case      :					Union[str, Any]					=   [assigned_colors[idx] for idx in sorted_idxs]
    if obj_ids is not None:
     _snake_case      :					Union[str, Any]					=   self._create_text_labels_attr(lowerCAmelCase			,						lowerCAmelCase			,						lowerCAmelCase			,						lowerCAmelCase)
     for i in range(len(lowerCAmelCase)):
      _snake_case      :					int					=   assigned_colors[i]
      self.add_box(boxes[i]			,						lowerCAmelCase)
      self.draw_labels(labels[i]			,						boxes[i]			,						lowerCAmelCase)

   def        UpperCamelCase_					(   self							:     List[Any]			,						lowerCAmelCase							:     List[str]			,						lowerCAmelCase							:     str			,						lowerCAmelCase							:     Dict)			->			Dict:

    """simple docstring"""







    _snake_case      :					Union[str, Any]					=   box
    _snake_case      :					Any					=   (xa, ya)
    _snake_case      :					List[Any]					=   (ya - ya) * (xa - xa)
    _snake_case      :					Optional[Any]					=   _SMALL_OBJ * self.scale
    if instance_area < small or ya - ya < 40 * self.scale:
     if ya >= self.height - 5:
      _snake_case      :					Tuple					=   (xa, ya)
     else:
      _snake_case      :					List[Any]					=   (xa, ya)

    _snake_case      :					Any					=   (ya - ya) / np.sqrt(self.height * self.width)
    _snake_case      :					Optional[int]					=   self._change_color_brightness(lowerCAmelCase			,						brightness_factor=0.7)
    _snake_case      :					str					=   np.clip((height_ratio - 0.02) / 0.08 + 1			,						1.2			,						2)
    font_size *= 0.75 * self.font_size

    self.draw_text(
        text=lowerCAmelCase			,						position=lowerCAmelCase			,						color=lowerCAmelCase			,						)

   def        UpperCamelCase_					(   self							:     int			,						lowerCAmelCase							:     Any			,						lowerCAmelCase							:     str			,						lowerCAmelCase							:     List[Any]="g"			,						lowerCAmelCase							:     Tuple="left"			,						)			->			Tuple:

    """simple docstring"""







    _snake_case      :					Dict					=   0
    _snake_case      :					int					=   self.font_size
    _snake_case      :					Any					=   np.maximum(list(mplc.to_rgb(lowerCAmelCase))			,						0.2)
    _snake_case      :					Tuple					=   max(0.8			,						np.max(lowerCAmelCase))
    _snake_case      :					Tuple					=   {
        """facecolor""": """black""",
        """alpha""": self.alpha,
        """pad""": self.pad,
        """edgecolor""": """none""",
    }
    _snake_case      :					List[str]					=   position
    self.ax.text(
        lowerCAmelCase			,						lowerCAmelCase			,						lowerCAmelCase			,						size=font_size * self.scale			,						family="""sans-serif"""			,						bbox=lowerCAmelCase			,						verticalalignment="""top"""			,						horizontalalignment=lowerCAmelCase			,						color=lowerCAmelCase			,						zorder=10			,						rotation=lowerCAmelCase			,						)

   def        UpperCamelCase_					(   self							:     Optional[int]			,						lowerCAmelCase							:     str=None)			->			List[str]:

    """simple docstring"""







    if saveas is None:
     _snake_case      :					Any					=   self.saveas
    if saveas.lower().endswith(""".jpg""") or saveas.lower().endswith(""".png"""):
     cva.imwrite(
         lowerCAmelCase			,						self._get_buffer()[:, :, ::-1]			,						)
    else:
     self.fig.savefig(lowerCAmelCase)

   def        UpperCamelCase_					(   self							:     Optional[Any]			,						lowerCAmelCase							:     Union[str, Any]			,						lowerCAmelCase							:     List[Any]			,						lowerCAmelCase							:     Any			,						lowerCAmelCase							:     Tuple)			->			Dict:

    """simple docstring"""







    _snake_case      :					str					=   [self.idaobj[i] for i in classes]
    _snake_case      :					Optional[int]					=   [self.idaattr[i] for i in attr_classes]
    _snake_case      :					Optional[int]					=   [
        F'''{label} {score:.2f} {attr} {attr_score:.2f}'''
        for label, score, attr, attr_score in zip(lowerCAmelCase			,						lowerCAmelCase			,						lowerCAmelCase			,						lowerCAmelCase)
    ]
    return labels

   def        UpperCamelCase_					(   self							:     List[str]			,						lowerCAmelCase							:     Optional[int]			,						lowerCAmelCase							:     Dict)			->			List[Any]:

    """simple docstring"""







    _snake_case      :					Union[str, Any]					=   [self.idaobj[i] for i in classes]
    if scores is not None:
     if labels is None:
      _snake_case      :					List[Any]					=   ["""{:.0f}%""".format(s * 100) for s in scores]
     else:
      _snake_case      :					List[str]					=   ["""{} {:.0f}%""".format(lowerCAmelCase			,						s * 100) for li, s in zip(lowerCAmelCase			,						lowerCAmelCase)]
    return labels

   def        UpperCamelCase_					(   self							:     Dict			,						lowerCAmelCase							:     List[str]=255)			->			Tuple:

    """simple docstring"""







    _snake_case      :					Dict					=   np.random.randint(0			,						len(_COLORS))
    _snake_case      :					int					=   _COLORS[idx] * maximum
    if not self.rgb:
     _snake_case      :					Dict					=   ret[::-1]
    return ret

   def        UpperCamelCase_					(   self							:     Dict)			->			Dict:

    """simple docstring"""







    if not self.pynb:
     _snake_case      :					Optional[int]					=   self.canvas.print_to_buffer()
     if (width, height) != (self.width, self.height):
      _snake_case      :					int					=   cva.resize(self.img			,						(width, height))
     else:
      _snake_case      :					Optional[int]					=   self.img
    else:
     _snake_case      :					int					=   io.BytesIO()  # works for cairo backend
     self.canvas.print_rgba(lowerCAmelCase)
     _snake_case      :					List[Any]					=   self.width, self.height
     _snake_case      :					Optional[Any]					=   buf.getvalue()
     _snake_case      :					Tuple					=   self.img

    _snake_case      :					Union[str, Any]					=   np.frombuffer(lowerCAmelCase			,						dtype="""uint8""")
    _snake_case      :					Optional[Any]					=   buffer.reshape(lowerCAmelCase			,						lowerCAmelCase			,						4)
    _snake_case      :					Any					=   np.split(lowerCAmelCase			,						[3]			,						axis=2)

    try:
     import numexpr as ne  # fuse them with numexpr

     _snake_case      :					Dict					=   ne.evaluate("""img * (1 - alpha / 255.0) + rgb * (alpha / 255.0)""")
    except ImportError:
     _snake_case      :					List[str]					=   alpha.astype("""float32""") / 255.0
     _snake_case      :					Dict					=   img * (1 - alpha) + rgb * alpha

    return visualized_image.astype("""uint8""")


   def        UpperCamelCase_					(   self							:     int			,						lowerCAmelCase							:     Dict			,						lowerCAmelCase							:     Optional[Any])			->			Any:

    """simple docstring"""







    assert brightness_factor >= -1.0 and brightness_factor <= 1.0
    _snake_case      :					List[Any]					=   mplc.to_rgb(lowerCAmelCase)
    _snake_case      :					int					=   colorsys.rgb_to_hls(*mplc.to_rgb(lowerCAmelCase))
    _snake_case      :					Optional[int]					=   polygon_color[1] + (brightness_factor * polygon_color[1])
    _snake_case      :					Tuple					=   0.0 if modified_lightness < 0.0 else modified_lightness
    _snake_case      :					List[Any]					=   1.0 if modified_lightness > 1.0 else modified_lightness
    _snake_case      :					List[str]					=   colorsys.hls_to_rgb(polygon_color[0]			,						lowerCAmelCase			,						polygon_color[2])
    return modified_color
a__      =		(
    np.array(
        [
            0.000,
            0.447,
            0.741,
            0.850,
            0.325,
            0.098,
            0.929,
            0.694,
            0.125,
            0.494,
            0.184,
            0.556,
            0.466,
            0.674,
            0.188,
            0.301,
            0.745,
            0.933,
            0.635,
            0.078,
            0.184,
            0.300,
            0.300,
            0.300,
            0.600,
            0.600,
            0.600,
            1.000,
            0.000,
            0.000,
            1.000,
            0.500,
            0.000,
            0.749,
            0.749,
            0.000,
            0.000,
            1.000,
            0.000,
            0.000,
            0.000,
            1.000,
            0.667,
            0.000,
            1.000,
            0.333,
            0.333,
            0.000,
            0.333,
            0.667,
            0.000,
            0.333,
            1.000,
            0.000,
            0.667,
            0.333,
            0.000,
            0.667,
            0.667,
            0.000,
            0.667,
            1.000,
            0.000,
            1.000,
            0.333,
            0.000,
            1.000,
            0.667,
            0.000,
            1.000,
            1.000,
            0.000,
            0.000,
            0.333,
            0.500,
            0.000,
            0.667,
            0.500,
            0.000,
            1.000,
            0.500,
            0.333,
            0.000,
            0.500,
            0.333,
            0.333,
            0.500,
            0.333,
            0.667,
            0.500,
            0.333,
            1.000,
            0.500,
            0.667,
            0.000,
            0.500,
            0.667,
            0.333,
            0.500,
            0.667,
            0.667,
            0.500,
            0.667,
            1.000,
            0.500,
            1.000,
            0.000,
            0.500,
            1.000,
            0.333,
            0.500,
            1.000,
            0.667,
            0.500,
            1.000,
            1.000,
            0.500,
            0.000,
            0.333,
            1.000,
            0.000,
            0.667,
            1.000,
            0.000,
            1.000,
            1.000,
            0.333,
            0.000,
            1.000,
            0.333,
            0.333,
            1.000,
            0.333,
            0.667,
            1.000,
            0.333,
            1.000,
            1.000,
            0.667,
            0.000,
            1.000,
            0.667,
            0.333,
            1.000,
            0.667,
            0.667,
            1.000,
            0.667,
            1.000,
            1.000,
            1.000,
            0.000,
            1.000,
            1.000,
            0.333,
            1.000,
            1.000,
            0.667,
            1.000,
            0.333,
            0.000,
            0.000,
            0.500,
            0.000,
            0.000,
            0.667,
            0.000,
            0.000,
            0.833,
            0.000,
            0.000,
            1.000,
            0.000,
            0.000,
            0.000,
            0.167,
            0.000,
            0.000,
            0.333,
            0.000,
            0.000,
            0.500,
            0.000,
            0.000,
            0.667,
            0.000,
            0.000,
            0.833,
            0.000,
            0.000,
            1.000,
            0.000,
            0.000,
            0.000,
            0.167,
            0.000,
            0.000,
            0.333,
            0.000,
            0.000,
            0.500,
            0.000,
            0.000,
            0.667,
            0.000,
            0.000,
            0.833,
            0.000,
            0.000,
            1.000,
            0.000,
            0.000,
            0.000,
            0.143,
            0.143,
            0.143,
            0.857,
            0.857,
            0.857,
            1.000,
            1.000,
            1.000,
        ]
    )
    .astype(np.floataa)
    .reshape(-1, 3)
)





import math
from collections import OrderedDict

import torch
from packaging import version
from torch import Tensor, nn

from .utils import logging


a__      =		logging.get_logger(__name__)







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def __init__(   self							:     Tuple)			->			Optional[int]:

    """simple docstring"""







    super().__init__()
    if version.parse(torch.__version__) < version.parse("""1.12.0"""):
     raise ImportError(
         F'''You are using torch=={torch.__version__}, but torch>=1.12.0 is required to use '''
         """PytorchGELUTanh. Please upgrade torch.""")


   def        UpperCamelCase_					(   self							:     Tuple			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return nn.functional.gelu(lowerCAmelCase			,						approximate="""tanh""")







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def        UpperCamelCase_					(   self							:     Optional[int]			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return 0.5 * input * (1.0 + torch.tanh(math.sqrt(2.0 / math.pi) * (input + 0.044_715 * torch.pow(lowerCAmelCase			,						3.0))))







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def __init__(   self							:     str			,						lowerCAmelCase							:     bool = False)			->			Optional[Any]:

    """simple docstring"""







    super().__init__()
    if use_gelu_python:
     _snake_case      :					Optional[int]					=   self._gelu_python
    else:
     _snake_case      :					Any					=   nn.functional.gelu

   def        UpperCamelCase_					(   self							:     Union[str, Any]			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return input * 0.5 * (1.0 + torch.erf(input / math.sqrt(2.0)))


   def        UpperCamelCase_					(   self							:     str			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return self.act(lowerCAmelCase)







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def        UpperCamelCase_					(   self							:     int			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return 0.5 * input * (1.0 + torch.tanh(input * 0.7_978_845_608 * (1.0 + 0.044_715 * input * input)))







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def        UpperCamelCase_					(   self							:     int			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return input * torch.sigmoid(1.702 * input)







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def __init__(   self							:     int			,						lowerCAmelCase							:     float			,						lowerCAmelCase							:     float)			->			Optional[int]:

    """simple docstring"""







    if min > max:
     raise ValueError(F'''min should be < max (got min: {min}, max: {max})''')

    super().__init__()
    _snake_case      :					Dict					=   min
    _snake_case      :					Optional[int]					=   max


   def        UpperCamelCase_					(   self							:     Union[str, Any]			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return torch.clip(gelu(lowerCAmelCase)			,						self.min			,						self.max)







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def __init__(   self							:     Tuple)			->			List[str]:

    """simple docstring"""







    super().__init__()
    _snake_case      :					Union[str, Any]					=   math.sqrt(2 / math.pi)


   def        UpperCamelCase_					(   self							:     Dict			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return 0.5 * input * (1 + torch.tanh(self.precomputed_constant * (input + 0.044_715 * torch.pow(lowerCAmelCase			,						3))))







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def        UpperCamelCase_					(   self							:     Dict			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return nn.functional.silu(lowerCAmelCase)







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def __init__(   self							:     List[Any])			->			str:

    """simple docstring"""







    super().__init__()
    if version.parse(torch.__version__) < version.parse("""1.9.0"""):
     _snake_case      :					Optional[int]					=   self._mish_python
    else:
     _snake_case      :					List[str]					=   nn.functional.mish

   def        UpperCamelCase_					(   self							:     str			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return input * torch.tanh(nn.functional.softplus(lowerCAmelCase))


   def        UpperCamelCase_					(   self							:     str			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return self.act(lowerCAmelCase)







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def        UpperCamelCase_					(   self							:     Optional[Any]			,						lowerCAmelCase							:     Tensor)			->			Tensor:

    """simple docstring"""







    return input







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def        UpperCamelCase_					(   self							:     List[Any]			,						lowerCAmelCase							:     int			,						lowerCAmelCase							:     List[Any]=0.707_107			,						lowerCAmelCase							:     Optional[Any]=0.282_095)			->			List[Any]:

    """simple docstring"""







    _snake_case      :					List[str]					=   (input - mu).div(sigma * math.sqrt(2.0))
    return 0.5 * (1.0 + torch.erf(lowerCAmelCase))







class 						snake_case  (		nn.Module					):



   '''simple docstring'''






   def        UpperCamelCase_					(   self							:     Any			,						lowerCAmelCase							:     Dict)			->			Union[str, Any]:

    """simple docstring"""







    _snake_case      :					Dict					=   nn.functional.relu(lowerCAmelCase)
    _snake_case      :					Tuple					=   torch.square(lowerCAmelCase)
    return squared







class 						snake_case  (		SCREAMING_SNAKE_CASE_					):



   '''simple docstring'''






   def __getitem__(   self							:     Dict			,						lowerCAmelCase							:     Tuple)			->			str:

    """simple docstring"""







    _snake_case      :					Optional[Any]					=   super().__getitem__(lowerCAmelCase)
    _snake_case		,      _snake_case      :					List[str]					=   content if isinstance(lowerCAmelCase			,						lowerCAmelCase) else (content, {})
    return cls(**lowerCAmelCase)
a__      =		{
    """gelu""": GELUActivation,
    """gelu_10""": (ClippedGELUActivation, {"""min""": -10, """max""": 10}),
    """gelu_fast""": FastGELUActivation,
    """gelu_new""": NewGELUActivation,
    """gelu_python""": (GELUActivation, {"""use_gelu_python""": True}),
    """gelu_pytorch_tanh""": PytorchGELUTanh,
    """gelu_accurate""": AccurateGELUActivation,
    """laplace""": LaplaceActivation,
    """linear""": LinearActivation,
    """mish""": MishActivation,
    """quick_gelu""": QuickGELUActivation,
    """relu""": nn.ReLU,
    """relu2""": ReLUSquaredActivation,
    """relu6""": nn.ReLUa,
    """sigmoid""": nn.Sigmoid,
    """silu""": SiLUActivation,
    """swish""": SiLUActivation,
    """tanh""": nn.Tanh,
}
a__      =		ClassInstantier(ACTaCLS)



def  lowercase    (				SCREAMING_SNAKE_CASE__    :		Any			)					->       int:
 if activation_string in ACTaFN:
  return ACTaFN[activation_string]
 else:
  raise KeyError(F'''function {activation_string} not found in ACT2FN mapping {list(ACTaFN.keys()			)}'''			)


# For backwards compatibility with: from activations import gelu_python
a__      =		get_activation("""gelu_python""")
a__      =		get_activation("""gelu_new""")
a__      =		get_activation("""gelu""")
a__      =		get_activation("""gelu_fast""")
a__      =		get_activation("""quick_gelu""")
a__      =		get_activation("""silu""")
a__      =		get_activation("""mish""")

a__      =		get_activation("""linear""")
