import inspect
import unittest
import warnings
from math import ceil, floor

from transformers import LevitConfig
from transformers.file_utils import cached_property, is_torch_available, is_vision_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_torch, require_vision, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
      import torch

      from transformers import (
          MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING,
          MODEL_MAPPING,
          LevitForImageClassification,
          LevitForImageClassificationWithTeacher,
          LevitModel,
      )
      from transformers.models.levit.modeling_levit import LEVIT_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
      from PIL import Image

      from transformers import LevitImageProcessor






class 		_lowerCamelCase		( UpperCamelCase_     ):
    def     UpperCamelCase_					(	self )							->       Optional[Any]:
     SCREAMING_SNAKE_CASE__: str=   self.config_class(**self.inputs_dict )
     self.parent.assertTrue(hasattr(lowerCAmelCase			,			'''hidden_sizes''' ) )
     self.parent.assertTrue(hasattr(lowerCAmelCase			,			'''num_attention_heads''' ) )






class 		_lowerCamelCase		:
    def __init__(	self			,			lowerCAmelCase			,			lowerCAmelCase=13			,			lowerCAmelCase=64			,			lowerCAmelCase=3			,			lowerCAmelCase=3			,			lowerCAmelCase=2			,			lowerCAmelCase=1			,			lowerCAmelCase=16			,			lowerCAmelCase=[128, 256, 384]			,			lowerCAmelCase=[4, 6, 8]			,			lowerCAmelCase=[2, 3, 4]			,			lowerCAmelCase=[16, 16, 16]			,			lowerCAmelCase=0			,			lowerCAmelCase=[2, 2, 2]			,			lowerCAmelCase=[2, 2, 2]			,			lowerCAmelCase=0.02			,			lowerCAmelCase=True			,			lowerCAmelCase=True			,			lowerCAmelCase=2			,			)							->       Optional[Any]:
     SCREAMING_SNAKE_CASE__: Union[str, Any]=   parent
     SCREAMING_SNAKE_CASE__: str=   batch_size
     SCREAMING_SNAKE_CASE__: int=   image_size
     SCREAMING_SNAKE_CASE__: Any=   num_channels
     SCREAMING_SNAKE_CASE__: Tuple=   kernel_size
     SCREAMING_SNAKE_CASE__: List[str]=   stride
     SCREAMING_SNAKE_CASE__: Tuple=   padding
     SCREAMING_SNAKE_CASE__: str=   hidden_sizes
     SCREAMING_SNAKE_CASE__: List[Any]=   num_attention_heads
     SCREAMING_SNAKE_CASE__: Any=   depths
     SCREAMING_SNAKE_CASE__: Tuple=   key_dim
     SCREAMING_SNAKE_CASE__: Union[str, Any]=   drop_path_rate
     SCREAMING_SNAKE_CASE__: Optional[Any]=   patch_size
     SCREAMING_SNAKE_CASE__: List[str]=   attention_ratio
     SCREAMING_SNAKE_CASE__: List[str]=   mlp_ratio
     SCREAMING_SNAKE_CASE__: Dict=   initializer_range
     SCREAMING_SNAKE_CASE__: str=   [
         ['''Subsample''', key_dim[0], hidden_sizes[0] // key_dim[0], 4, 2, 2],
         ['''Subsample''', key_dim[0], hidden_sizes[1] // key_dim[0], 4, 2, 2],
     ]
     SCREAMING_SNAKE_CASE__: str=   is_training
     SCREAMING_SNAKE_CASE__: Optional[Any]=   use_labels
     SCREAMING_SNAKE_CASE__: str=   num_labels
     SCREAMING_SNAKE_CASE__: Optional[int]=   initializer_range
    def     UpperCamelCase_					(	self )							->       Union[str, Any]:
     SCREAMING_SNAKE_CASE__: int=   floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size] )

     SCREAMING_SNAKE_CASE__: Optional[int]=   None
     if self.use_labels:
      SCREAMING_SNAKE_CASE__: int=   ids_tensor([self.batch_size]			,			self.num_labels )

     SCREAMING_SNAKE_CASE__: List[Any]=   self.get_config()
     return config, pixel_values, labels
    def     UpperCamelCase_					(	self )							->       Optional[int]:
     return LevitConfig(
         image_size=self.image_size			,			num_channels=self.num_channels			,			kernel_size=self.kernel_size			,			stride=self.stride			,			padding=self.padding			,			patch_size=self.patch_size			,			hidden_sizes=self.hidden_sizes			,			num_attention_heads=self.num_attention_heads			,			depths=self.depths			,			key_dim=self.key_dim			,			drop_path_rate=self.drop_path_rate			,			mlp_ratio=self.mlp_ratio			,			attention_ratio=self.attention_ratio			,			initializer_range=self.initializer_range			,			down_ops=self.down_ops			,			)
    def     UpperCamelCase_					(	self			,			lowerCAmelCase			,			lowerCAmelCase			,			lowerCAmelCase )							->       str:
     SCREAMING_SNAKE_CASE__: List[str]=   LevitModel(config=lowerCAmelCase )
     model.to(lowerCAmelCase )
     model.eval()
     SCREAMING_SNAKE_CASE__: int=   model(lowerCAmelCase )
     SCREAMING_SNAKE_CASE__: List[Any]=   (self.image_size, self.image_size)
     SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__: Dict=   image_size[0], image_size[1]
     for _ in range(4 ):
      SCREAMING_SNAKE_CASE__: int=   floor(((height + 2 * self.padding - self.kernel_size) / self.stride) + 1 )
      SCREAMING_SNAKE_CASE__: Optional[int]=   floor(((width + 2 * self.padding - self.kernel_size) / self.stride) + 1 )
     self.parent.assertEqual(
         result.last_hidden_state.shape			,			(self.batch_size, ceil(height / 4 ) * ceil(width / 4 ), self.hidden_sizes[-1])			,			)
    def     UpperCamelCase_					(	self			,			lowerCAmelCase			,			lowerCAmelCase			,			lowerCAmelCase )							->       List[str]:
     SCREAMING_SNAKE_CASE__: str=   self.num_labels
     SCREAMING_SNAKE_CASE__: int=   LevitForImageClassification(lowerCAmelCase )
     model.to(lowerCAmelCase )
     model.eval()
     SCREAMING_SNAKE_CASE__: List[str]=   model(lowerCAmelCase			,			labels=lowerCAmelCase )
     self.parent.assertEqual(result.logits.shape			,			(self.batch_size, self.num_labels) )



    def     UpperCamelCase_					(	self )							->       Optional[Any]:
     SCREAMING_SNAKE_CASE__: List[str]=   self.prepare_config_and_inputs()
     SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__: str=   config_and_inputs
     SCREAMING_SNAKE_CASE__: List[Any]=   {'''pixel_values''': pixel_values}
     return config, inputs_dict






@require_torch
class 		_lowerCamelCase		( UpperCamelCase_     ,  UpperCamelCase_     ,  unittest.TestCase     ):
    __a						=   (
        (LevitModel, LevitForImageClassification, LevitForImageClassificationWithTeacher)
        if is_torch_available()
        else ()
    )
    __a						=   (
        {
            "feature-extraction": LevitModel,
            "image-classification": (LevitForImageClassification, LevitForImageClassificationWithTeacher),
        }
        if is_torch_available()
        else {}
    )

    __a						=   False
    __a						=   False
    __a						=   False
    __a						=   False
    __a						=   False
    def     UpperCamelCase_					(	self )							->       Optional[int]:
     SCREAMING_SNAKE_CASE__: int=   LevitModelTester(self )
     SCREAMING_SNAKE_CASE__: Any=   ConfigTester(self			,			config_class=lowerCAmelCase			,			has_text_modality=lowerCAmelCase			,			hidden_size=37 )
    def     UpperCamelCase_					(	self )							->       int:
     self.create_and_test_config_common_properties()
     self.config_tester.create_and_test_config_to_json_string()
     self.config_tester.create_and_test_config_to_json_file()
     self.config_tester.create_and_test_config_from_and_save_pretrained()
     self.config_tester.create_and_test_config_with_num_labels()
     self.config_tester.check_config_can_be_init_without_params()
     self.config_tester.check_config_arguments_init()
    def     UpperCamelCase_					(	self )							->       Optional[Any]:
     return
    @unittest.skip(reason='''Levit does not use inputs_embeds''' )
    def     UpperCamelCase_					(	self )							->       Tuple:
     pass
    @unittest.skip(reason='''Levit does not support input and output embeddings''' )
    def     UpperCamelCase_					(	self )							->       Optional[Any]:
     pass
    @unittest.skip(reason='''Levit does not output attentions''' )
    def     UpperCamelCase_					(	self )							->       int:
     pass
    def     UpperCamelCase_					(	self )							->       int:
     SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__: Dict=   self.model_tester.prepare_config_and_inputs_for_common()

     for model_class in self.all_model_classes:
      SCREAMING_SNAKE_CASE__: Any=   model_class(lowerCAmelCase )
      SCREAMING_SNAKE_CASE__: Tuple=   inspect.signature(model.forward )
      # signature.parameters is an OrderedDict => so arg_names order is deterministic
      SCREAMING_SNAKE_CASE__: Union[str, Any]=   [*signature.parameters.keys()]

      SCREAMING_SNAKE_CASE__: Union[str, Any]=   ['''pixel_values''']
      self.assertListEqual(arg_names[:1]			,			lowerCAmelCase )
    def     UpperCamelCase_					(	self )							->       Union[str, Any]:
     def check_hidden_states_output(lowerCAmelCase			,			lowerCAmelCase			,			lowerCAmelCase ):
      SCREAMING_SNAKE_CASE__: Optional[int]=   model_class(lowerCAmelCase )
      model.to(lowerCAmelCase )
      model.eval()

      with torch.no_grad():
       SCREAMING_SNAKE_CASE__: Tuple=   model(**self._prepare_for_class(lowerCAmelCase			,			lowerCAmelCase ) )

      SCREAMING_SNAKE_CASE__: Optional[int]=   outputs.hidden_states

      SCREAMING_SNAKE_CASE__: List[str]=   len(self.model_tester.depths ) + 1
      self.assertEqual(len(lowerCAmelCase )			,			lowerCAmelCase )

      SCREAMING_SNAKE_CASE__: Optional[int]=   (self.model_tester.image_size, self.model_tester.image_size)
      SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__: int=   image_size[0], image_size[1]
      for _ in range(4 ):
       SCREAMING_SNAKE_CASE__: str=   floor(
           (
               (height + 2 * self.model_tester.padding - self.model_tester.kernel_size)
               / self.model_tester.stride
           )
           + 1 )
       SCREAMING_SNAKE_CASE__: Dict=   floor(
           (
               (width + 2 * self.model_tester.padding - self.model_tester.kernel_size)
               / self.model_tester.stride
           )
           + 1 )
      # verify the first hidden states (first block)
      self.assertListEqual(
          list(hidden_states[0].shape[-2:] )			,			[
              height * width,
              self.model_tester.hidden_sizes[0],
          ]			,			)

     SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__: Any=   self.model_tester.prepare_config_and_inputs_for_common()

     for model_class in self.all_model_classes:
      SCREAMING_SNAKE_CASE__: str=   True
      check_hidden_states_output(lowerCAmelCase			,			lowerCAmelCase			,			lowerCAmelCase )

      # check that output_hidden_states also work using config
      del inputs_dict["output_hidden_states"]
      SCREAMING_SNAKE_CASE__: List[str]=   True

      check_hidden_states_output(lowerCAmelCase			,			lowerCAmelCase			,			lowerCAmelCase )
    @unittest.skip('''Will be fixed soon by reducing the size of the model used for common tests.''' )
    def     UpperCamelCase_					(	self )							->       Any:
     pass
    def     UpperCamelCase_					(	self			,			lowerCAmelCase			,			lowerCAmelCase			,			lowerCAmelCase=False )							->       Optional[Any]:
     SCREAMING_SNAKE_CASE__: Tuple=   super()._prepare_for_class(lowerCAmelCase			,			lowerCAmelCase			,			return_labels=lowerCAmelCase )

     if return_labels:
      if model_class.__name__ == "LevitForImageClassificationWithTeacher":
       del inputs_dict["labels"]

     return inputs_dict
    def     UpperCamelCase_					(	self )							->       List[str]:
     SCREAMING_SNAKE_CASE__: Union[str, Any]=   self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_model(*lowerCAmelCase )
    def     UpperCamelCase_					(	self )							->       Optional[int]:
     SCREAMING_SNAKE_CASE__: Optional[Any]=   self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_for_image_classification(*lowerCAmelCase )
    def     UpperCamelCase_					(	self )							->       Optional[int]:
     if not self.model_tester.is_training:
      return

     SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__: List[str]=   self.model_tester.prepare_config_and_inputs_for_common()
     SCREAMING_SNAKE_CASE__: int=   True

     for model_class in self.all_model_classes:
      # LevitForImageClassificationWithTeacher supports inference-only
      if (
          model_class in get_values(lowerCAmelCase )
          or model_class.__name__ == "LevitForImageClassificationWithTeacher"
      ):
       continue
      SCREAMING_SNAKE_CASE__: Optional[int]=   model_class(lowerCAmelCase )
      model.to(lowerCAmelCase )
      model.train()
      SCREAMING_SNAKE_CASE__: Optional[int]=   self._prepare_for_class(lowerCAmelCase			,			lowerCAmelCase			,			return_labels=lowerCAmelCase )
      SCREAMING_SNAKE_CASE__: Union[str, Any]=   model(**lowerCAmelCase ).loss
      loss.backward()
    def     UpperCamelCase_					(	self )							->       str:
     SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__: Tuple=   self.model_tester.prepare_config_and_inputs_for_common()
     if not self.model_tester.is_training:
      return

     SCREAMING_SNAKE_CASE__: int=   False
     SCREAMING_SNAKE_CASE__: Dict=   True

     for model_class in self.all_model_classes:
      if model_class in get_values(lowerCAmelCase ) or not model_class.supports_gradient_checkpointing:
       continue
      # LevitForImageClassificationWithTeacher supports inference-only
      if model_class.__name__ == "LevitForImageClassificationWithTeacher":
       continue
      SCREAMING_SNAKE_CASE__: List[str]=   model_class(lowerCAmelCase )
      model.gradient_checkpointing_enable()
      model.to(lowerCAmelCase )
      model.train()
      SCREAMING_SNAKE_CASE__: Optional[int]=   self._prepare_for_class(lowerCAmelCase			,			lowerCAmelCase			,			return_labels=lowerCAmelCase )
      SCREAMING_SNAKE_CASE__: int=   model(**lowerCAmelCase ).loss
      loss.backward()
    def     UpperCamelCase_					(	self )							->       int:
     SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__: Tuple=   self.model_tester.prepare_config_and_inputs_for_common()

     SCREAMING_SNAKE_CASE__: Optional[Any]=   [
         {'''title''': '''multi_label_classification''', '''num_labels''': 2, '''dtype''': torch.float},
         {'''title''': '''single_label_classification''', '''num_labels''': 1, '''dtype''': torch.long},
         {'''title''': '''regression''', '''num_labels''': 1, '''dtype''': torch.float},
     ]

     for model_class in self.all_model_classes:
      if (
          model_class
          not in [
              *get_values(lowerCAmelCase ),
          ]
          or model_class.__name__ == "LevitForImageClassificationWithTeacher"
      ):
       continue

      for problem_type in problem_types:
       with self.subTest(msg=f'Testing {model_class} with {problem_type["title"]}' ):
        SCREAMING_SNAKE_CASE__: str=   problem_type['''title''']
        SCREAMING_SNAKE_CASE__: Optional[int]=   problem_type['''num_labels''']

        SCREAMING_SNAKE_CASE__: Optional[int]=   model_class(lowerCAmelCase )
        model.to(lowerCAmelCase )
        model.train()

        SCREAMING_SNAKE_CASE__: Union[str, Any]=   self._prepare_for_class(lowerCAmelCase			,			lowerCAmelCase			,			return_labels=lowerCAmelCase )

        if problem_type["num_labels"] > 1:
         SCREAMING_SNAKE_CASE__: str=   inputs['''labels'''].unsqueeze(1 ).repeat(1			,			problem_type['''num_labels'''] )

        SCREAMING_SNAKE_CASE__: Optional[Any]=   inputs['''labels'''].to(problem_type['''dtype'''] )

        # This tests that we do not trigger the warning form PyTorch "Using a target size that is different
        # to the input size. This will likely lead to incorrect results due to broadcasting. Please ensure
        # they have the same size." which is a symptom something in wrong for the regression problem.
        # See https://github.com/huggingface/transformers/issues/11780
        with warnings.catch_warnings(record=lowerCAmelCase ) as warning_list:
         SCREAMING_SNAKE_CASE__: Any=   model(**lowerCAmelCase ).loss
        for w in warning_list:
         if "Using a target size that is different to the input size" in str(w.message ):
          raise ValueError(
              f'Something is going wrong in the regression problem: intercepted {w.message}' )

        loss.backward()



    @slow
    def     UpperCamelCase_					(	self )							->       List[str]:
     for model_name in LEVIT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
      SCREAMING_SNAKE_CASE__: str=   LevitModel.from_pretrained(lowerCAmelCase )
      self.assertIsNotNone(lowerCAmelCase )







def       A__   (						):
 SCREAMING_SNAKE_CASE__: Tuple=   Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''   )
 return image






@require_torch
@require_vision
class 		_lowerCamelCase		( unittest.TestCase     ):
    @cached_property
    def     UpperCamelCase_					(	self )							->       Dict:
     return LevitImageProcessor.from_pretrained(LEVIT_PRETRAINED_MODEL_ARCHIVE_LIST[0] )



    @slow
    def     UpperCamelCase_					(	self )							->       Any:
     SCREAMING_SNAKE_CASE__: str=   LevitForImageClassificationWithTeacher.from_pretrained(LEVIT_PRETRAINED_MODEL_ARCHIVE_LIST[0] ).to(
         lowerCAmelCase )

     SCREAMING_SNAKE_CASE__: List[str]=   self.default_image_processor
     SCREAMING_SNAKE_CASE__: Any=   prepare_img()
     SCREAMING_SNAKE_CASE__: Optional[Any]=   image_processor(images=lowerCAmelCase			,			return_tensors='''pt''' ).to(lowerCAmelCase )

     # forward pass
     with torch.no_grad():
      SCREAMING_SNAKE_CASE__: List[str]=   model(**lowerCAmelCase )

     # verify the logits
     SCREAMING_SNAKE_CASE__: List[str]=   torch.Size((1, 1000) )
     self.assertEqual(outputs.logits.shape			,			lowerCAmelCase )

     SCREAMING_SNAKE_CASE__: Any=   torch.tensor([1.0448, -0.3745, -1.8317] ).to(lowerCAmelCase )

     self.assertTrue(torch.allclose(outputs.logits[0, :3]			,			lowerCAmelCase			,			atol=1e-4 ) )






import json
import os

import torch

from diffusers import UNetaDModel


os.makedirs('''hub/hopper-medium-v2/unet/hor32''', exist_ok=True)
os.makedirs('''hub/hopper-medium-v2/unet/hor128''', exist_ok=True)

os.makedirs('''hub/hopper-medium-v2/value_function''', exist_ok=True)


def A    (							__UpperCamelCase       )    ->   Union[str, Any]:
			if hor == 128:
						A__	  =     ('DownResnetBlock1D', 'DownResnetBlock1D', 'DownResnetBlock1D')
						A__	  =     (32, 128, 256)
						A__	  =     ('UpResnetBlock1D', 'UpResnetBlock1D')

			elif hor == 32:
						A__	  =     ('DownResnetBlock1D', 'DownResnetBlock1D', 'DownResnetBlock1D', 'DownResnetBlock1D')
						A__	  =     (32, 64, 128, 256)
						A__	  =     ('UpResnetBlock1D', 'UpResnetBlock1D', 'UpResnetBlock1D')
			A__	  =     torch.load(f'''/Users/bglickenhaus/Documents/diffuser/temporal_unet-hopper-mediumv2-hor{hor}.torch'''       )
			A__	  =     model.state_dict()
			A__	  =     {
			    'down_block_types': down_block_types,
			    'block_out_channels': block_out_channels,
			    'up_block_types': up_block_types,
			    'layers_per_block': 1,
			    'use_timestep_embedding': True,
			    'out_block_type': 'OutConv1DBlock',
			    'norm_num_groups': 8,
			    'downsample_each_block': False,
			    'in_channels': 14,
			    'out_channels': 14,
			    'extra_in_channels': 0,
			    'time_embedding_type': 'positional',
			    'flip_sin_to_cos': False,
			    'freq_shift': 1,
			    'sample_size': 65_536,
			    'mid_block_type': 'MidResTemporalBlock1D',
			    'act_fn': 'mish',
			}
			A__	  =     UNetaDModel(**__UpperCamelCase       )
			print(f'''length of state dict: {len(state_dict.keys()       )}'''       )
			print(f'''length of value function dict: {len(hf_value_function.state_dict().keys()       )}'''       )
			A__	  =     dict(zip(model.state_dict().keys()			,						hf_value_function.state_dict().keys()       )       )
			for k, v in mapping.items():
						A__	  =     state_dict.pop(__UpperCamelCase       )
			hf_value_function.load_state_dict(__UpperCamelCase       )

			torch.save(hf_value_function.state_dict()			,						f'''hub/hopper-medium-v2/unet/hor{hor}/diffusion_pytorch_model.bin'''       )
			with open(f'''hub/hopper-medium-v2/unet/hor{hor}/config.json'''			,						'w'       ) as f:
						json.dump(__UpperCamelCase			,						__UpperCamelCase       )


def A    (							)    ->   List[str]:
			A__	  =     {
			    'in_channels': 14,
			    'down_block_types': ('DownResnetBlock1D', 'DownResnetBlock1D', 'DownResnetBlock1D', 'DownResnetBlock1D'),
			    'up_block_types': (),
			    'out_block_type': 'ValueFunction',
			    'mid_block_type': 'ValueFunctionMidBlock1D',
			    'block_out_channels': (32, 64, 128, 256),
			    'layers_per_block': 1,
			    'downsample_each_block': True,
			    'sample_size': 65_536,
			    'out_channels': 14,
			    'extra_in_channels': 0,
			    'time_embedding_type': 'positional',
			    'use_timestep_embedding': True,
			    'flip_sin_to_cos': False,
			    'freq_shift': 1,
			    'norm_num_groups': 8,
			    'act_fn': 'mish',
			}

			A__	  =     torch.load('/Users/bglickenhaus/Documents/diffuser/value_function-hopper-mediumv2-hor32.torch'       )
			A__	  =     model
			A__	  =     UNetaDModel(**__UpperCamelCase       )
			print(f'''length of state dict: {len(state_dict.keys()       )}'''       )
			print(f'''length of value function dict: {len(hf_value_function.state_dict().keys()       )}'''       )

			A__	  =     dict(zip(state_dict.keys()			,						hf_value_function.state_dict().keys()       )       )
			for k, v in mapping.items():
						A__	  =     state_dict.pop(__UpperCamelCase       )

			hf_value_function.load_state_dict(__UpperCamelCase       )

			torch.save(hf_value_function.state_dict()			,						'hub/hopper-medium-v2/value_function/diffusion_pytorch_model.bin'       )
			with open('hub/hopper-medium-v2/value_function/config.json'			,						'w'       ) as f:
						json.dump(__UpperCamelCase			,						__UpperCamelCase       )


if __name__ == "__main__":
							unet(3_2)
							# unet(128)
							value_function()




