  from ._base import logger
  from .original import Model as OriginalModel
  
  
  # [P] TODO Move upscale2x_hyb to nnblocks.py (after testing)
  # <<< DeLight Model Blocks >>> #
  def upscale2x_hyb(self, inp, filters, kernel_size=3, padding='same',
                    sr_ratio=0.5, scale_factor=2, interpolation='bilinear',
                    res_block_follows=False, **kwargs):
      """Hybrid Upscale Layer"""
      name = self._get_name("upscale2x_hyb")
      var_x = inp
  
      sr_filters = int(filters * sr_ratio)
      upscale_filters = filters - sr_filters
  
      var_x_sr = self.upscale(var_x, upscale_filters, kernel_size=kernel_size,
                              padding=padding, scale_factor=scale_factor,
                              res_block_follows=res_block_follows, **kwargs)
      if upscale_filters > 0:
          var_x_us = self.conv2d(var_x, upscale_filters,  kernel_size=3, padding=padding,
                                 name="{}_conv2d".format(name), **kwargs)
          var_x_us = UpSampling2D(size=(scale_factor, scale_factor), interpolation=interpolation,
                                  name="{}_upsampling2D".format(name))(var_x_us)
          var_x = Concatenate(name="{}_concatenate".format(name))([var_x_sr, var_x_us])
      else:
          var_x = var_x_sr
  
      return var_x
  
  
  def upscale2x_fast(self, inp, filters, kernel_size=3, padding='same',
                     sr_ratio=0.5, scale_factor=2, interpolation='bilinear',
                     res_block_follows=False, **kwargs):
      """Fast Upscale Layer"""
      name = self._get_name("upscale2x_fast")
      var_x = inp
  
      var_x2 = self.conv2d(var_x, filters,  kernel_size=3, padding=padding,
                           name="{}_conv2d".format(name), **kwargs)
      var_x2 = UpSampling2D(size=(scale_factor, scale_factor), interpolation=interpolation,
                            name="{}_upsampling2D".format(name))(var_x2)
  
      var_x1 = self.upscale(var_x, filters, kernel_size=kernel_size,
                            padding=padding, scale_factor=scale_factor,
                            res_block_follows=res_block_follows, **kwargs)
      var_x = Add()([var_x2, var_x1])
      return var_x
  
  
  class Model(OriginalModel):
      """ DeLight Autoencoder Model """
  
      def __init__(self, *args, **kwargs):
          logger.debug("Initializing %s: (args: %s, kwargs: %s",
 
</s> remove     def compile_predictors(self, **kwargs):
 </s> add     def compile_predictors(self, **kwargs):  # pylint: disable=arguments-differ </s> remove         # monkey patch-in nn_blocks
        self.blocks.upscale2x_hyb = types.MethodType(upscale2x_hyb, self.blocks)
        self.blocks.upscale2x_fast = types.MethodType(upscale2x_fast, self.blocks)
 </s> add  </s> remove         var_x = self.blocks.upscale2x_hyb(var_x, decoder_b_complexity)
 </s> add         var_x = self.blocks.upscale2x(var_x, decoder_b_complexity, fast=False) </s> remove         var_x = self.blocks.upscale2x_hyb(var_x, decoder_b_complexity // 2)
 </s> add         var_x = self.blocks.upscale2x(var_x, decoder_b_complexity // 2, fast=False)
  from ._base import logger
  from .original import Model as OriginalModel
  
  














































  class Model(OriginalModel):
      """ DeLight Autoencoder Model """
  
      def __init__(self, *args, **kwargs):
          logger.debug("Initializing %s: (args: %s, kwargs: %s",
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Move custom dlight blocks to nn_blocks 
plugins/train/model/dlight.py