  except ImportError:
      pass
  
  
  conv_init = RandomNormal(0, 0.02)
  
  
  
  def inst_norm():
 
</s> remove             print('backup functionality not available\n')                                      
        
        # thought maybe I/O bound, sometimes saving in parallel is faster
        threads = []
        t = Thread(target=self.encoder.save_weights, args=(str(self.model_dir / hdf['encoderH5']),))
        threads.append(t)         
        t = Thread(target=self.decoder_A.save_weights, args=(str(self.model_dir / hdf['decoder_AH5']),))
        threads.append(t)
        t = Thread(target=self.decoder_B.save_weights, args=(str(self.model_dir / hdf['decoder_BH5']),))
        threads.append(t)
 </s> add             print('backup functionality not available\n')       
            
        state_dir = os.path.join(self.model_dir, 'state_{version_str}_{ENCODER.value}.json'.format(**globals()))
        ser = lib.Serializer.get_serializer('json')
        try:
            with open(state_dir, 'wb') as fp:
                state_json = ser.marshal({
                    'epoch_no' : self._epoch_no
                     })
                fp.write(state_json.encode('utf-8'))
        except IOError as e:
            pass                                </s> remove from .instance_normalization import InstanceNormalization

 </s> add  </s> remove         
 </s> add         from json import JSONDecodeError </s> remove         for thread in threads:
            thread.start()            
 </s> add         print('\nsaving model weights', end='', flush=True)        
        from concurrent.futures import ThreadPoolExecutor, as_completed
class EncoderType(enum.Enum):
    ORIGINAL = "original"
    SHAOANLU = "shaoanlu"
    
    
ENCODER = EncoderType.ORIGINAL


if ENCODER==EncoderType.SHAOANLU:
    from .instance_normalization import InstanceNormalization

    
def inst_norm():
    return InstanceNormalization()     

  except ImportError:
      pass
  
  
class EncoderType(enum.Enum):
    ORIGINAL = "original"
    SHAOANLU = "shaoanlu"
    
    
ENCODER = EncoderType.ORIGINAL


if ENCODER==EncoderType.SHAOANLU:
    from .instance_normalization import InstanceNormalization

    
def inst_norm():
    return InstanceNormalization()     

  conv_init = RandomNormal(0, 0.02)
  
  
  
  def inst_norm():
keep keep keep add keep keep keep keep keep
 Update Model.py (#424)

- Added saving state (currently only saved epoch number, to be extended in future)
- Changed saving to ThreadPoolExecutor 
plugins/Model_OriginalHighRes/Model.py