

from manim import *



class 					_a		(__snake_case       ):


					'''simple docstring'''






					def 						__A    (				self    ):
						A__							:					Optional[int]       =	Rectangle(height=0.5					, width=0.5    )
						A__							:					str       =	Rectangle(height=0.2_5					, width=0.2_5    )
						A__							:					Optional[Any]       =	Rectangle(height=0.4_6					, width=0.4_6    ).set_stroke(width=0    )

						A__							:					Optional[Any]       =	[mem.copy() for i in range(6    )]
						A__							:					List[str]       =	[mem.copy() for i in range(6    )]
						A__							:					int       =	VGroup(*A_    ).arrange(A_					, buff=0    )
						A__							:					Tuple       =	VGroup(*A_    ).arrange(A_					, buff=0    )
						A__							:					Union[str, Any]       =	VGroup(A_					, A_    ).arrange(A_					, buff=0    )
						A__							:					Optional[int]       =	Text("""CPU"""					, font_size=24    )
						A__							:					List[Any]       =	Group(A_					, A_    ).arrange(A_					, buff=0.5					, aligned_edge=A_    )
						cpu.move_to([-2.5, -0.5, 0]    )
						self.add(A_    )

						A__							:					List[Any]       =	[mem.copy() for i in range(4    )]
						A__							:					List[Any]       =	VGroup(*A_    ).arrange(A_					, buff=0    )
						A__							:					Optional[Any]       =	Text("""GPU"""					, font_size=24    )
						A__							:					List[str]       =	Group(A_					, A_    ).arrange(A_					, buff=0.5					, aligned_edge=A_    )
						gpu.move_to([-1, -1, 0]    )
						self.add(A_    )

						A__							:					Any       =	[mem.copy() for i in range(6    )]
						A__							:					Any       =	VGroup(*A_    ).arrange(A_					, buff=0    )

						A__							:					Optional[Any]       =	Text("""Model"""					, font_size=24    )
						A__							:					List[Any]       =	Group(A_					, A_    ).arrange(A_					, buff=0.5					, aligned_edge=A_    )
						model.move_to([3, -1.0, 0]    )
						self.add(A_    )

						A__							:					Dict       =	[]
						A__							:					int       =	[]
						A__							:					Tuple       =	[]

						for i, rect in enumerate(A_    ):
							rect.set_stroke(A_    )

							A__							:					Optional[Any]       =	Rectangle(height=0.4_6 / 4					, width=0.4_6 / 3    ).set_stroke(width=0.0    ).set_fill(A_					, opacity=0.7    )

							if i == 0:
								cpu_target.next_to(cpu_left_col_base[0].get_corner(DOWN + LEFT    )					, buff=0.0_2					, direction=A_    )
								cpu_target.set_x(cpu_target.get_x() + 0.1    )
							elif i == 3:
								cpu_target.next_to(model_cpu_arr[0]					, direction=A_					, buff=0.0    )
							else:
								cpu_target.next_to(model_cpu_arr[i - 1]					, direction=A_					, buff=0.0    )
							self.add(A_    )
							model_cpu_arr.append(A_    )

						self.add(*A_					, *A_					, *A_    )

						A__							:					Any       =	[mem.copy() for i in range(6    )]
						A__							:					List[str]       =	VGroup(*A_    ).arrange(A_					, buff=0    )

						A__							:					Dict       =	Text("""Loaded Checkpoint"""					, font_size=24    )
						A__							:					Union[str, Any]       =	Group(A_					, A_    ).arrange(A_					, buff=0.5					, aligned_edge=A_    )
						checkpoint.move_to([3, 0.5, 0]    )

						self.add(A_    )

						A__							:					int       =	[]
						A__							:					List[Any]       =	[]

						for i, rect in enumerate(A_    ):
							A__							:					int       =	fill.copy().set_fill(A_					, opacity=0.7    )
							target.move_to(A_    )
							ckpt_arr.append(A_    )

							A__							:					Optional[Any]       =	target.copy()
							if i < 5:
								cpu_target.move_to(cpu_left_col_base[i + 1]    )
							else:
								cpu_target.move_to(cpu_right_col_base[i - 5]    )
							ckpt_cpu_arr.append(A_    )
						self.add(*A_					, *A_    )

						A__							:					Any       =	Square(side_length=2.2    )
						key.move_to([-5, 2, 0]    )

						A__							:					Any       =	MarkupText(
						    F"""<b>Key:</b>\n\n<span fgcolor='{YELLOW}'>●</span> Empty Model"""					, font_size=18					, )

						key_text.move_to([-5, 2.4, 0]    )

						self.add(A_					, A_    )

						A__							:					List[str]       =	MarkupText(
						    F"""<span fgcolor='{BLUE}'>●</span> Checkpoint"""					, font_size=18					, )

						blue_text.next_to(A_					, DOWN * 2.4					, aligned_edge=key_text.get_left()    )
						self.add(A_    )

						A__							:					Optional[int]       =	MarkupText(
						    F"""Based on the passed in configuration, weights are stored in\na variety of np.memmaps on disk or to a particular device."""					, font_size=24					, )
						step_a.move_to([2, 2, 0]    )

						A__							:					Union[str, Any]       =	[meta_mem.copy() for i in range(6    )]
						A__							:					List[str]       =	[meta_mem.copy() for i in range(6    )]
						A__							:					str       =	VGroup(*A_    ).arrange(A_					, buff=0    )
						A__							:					Union[str, Any]       =	VGroup(*A_    ).arrange(A_					, buff=0    )
						A__							:					List[str]       =	VGroup(A_					, A_    ).arrange(A_					, buff=0    )
						A__							:					str       =	Text("""Disk"""					, font_size=24    )
						A__							:					int       =	Group(A_					, A_    ).arrange(A_					, buff=0.5					, aligned_edge=A_    )
						disk.move_to([-4.0, -1.2_5, 0]    )
						self.play(Write(A_					, run_time=3    )					, Write(A_					, run_time=1    )					, Create(A_					, run_time=1    )    )

						A__							:					Union[str, Any]       =	[]
						for i, rect in enumerate(A_    ):
							A__							:					List[Any]       =	rect.copy()
							target.generate_target()
							target.target.move_to(disk_left_col_base[i]    ).scale(0.5    )
							animations.append(MoveToTarget(A_					, run_time=1.5    )    )
						self.play(*A_    )

						self.play(FadeOut(A_    )    )

						A__							:					Any       =	MarkupText(F"""Then, the checkpoint is removed from memory\nthrough garbage collection."""					, font_size=24    )
						step_a.move_to([2, 2, 0]    )

						self.play(Write(A_					, run_time=3    )    )

						self.play(
						    FadeOut(A_					, A_					, *A_					, *A_    )					, )

						self.wait()






import warnings

from ...utils import logging
from .image_processing_poolformer import PoolFormerImageProcessor


A_ :				Union[str, Any]						 =    logging.get_logger(__name__)



class 					_a		(__magic_name__       ):


					'''simple docstring'''






					def __init__(				self					, *A__					, **A__    ):
						warnings.warn(
						    """The class PoolFormerFeatureExtractor is deprecated and will be removed in version 5 of Transformers."""
						    """ Please use PoolFormerImageProcessor instead."""					, A__					, )
						super().__init__(*A__					, **A__    )



