          return self._model_name
               
      
      def __str__(self):
          return "<{}: ver={}, nn_dims={}, img_size={}>".format(self.model_name, 
                                                                version_str, 
                                                                self.ENCODER_DIM, 
                                                                "x".join([str(n) for n in self.IMAGE_SHAPE[:2]]))                
 
</s> remove from .instance_normalization import InstanceNormalization

 </s> add  </s> remove         while any([t.is_alive() for t in threads]):
            sleep(0.1)
            
        print('saved model weights')              
 </s> add         # thought maybe I/O bound, sometimes saving in parallel is faster
        with ThreadPoolExecutor(max_workers=4) as executor:
            futures = [executor.submit(getattr(self, mdl_name.rstrip('H5')).save_weights, str(self.model_dir / mdl_H5_fn)) for mdl_name, mdl_H5_fn in hdf.items()]
            for future in as_completed(futures):
                future.result()
                print('.', end='', flush=True)  

        print('done', flush=True)               </s> remove         for thread in threads:
            thread.start()            
 </s> add         print('\nsaving model weights', end='', flush=True)        
        from concurrent.futures import ThreadPoolExecutor, as_completed </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                               
        return "<{}: ver={}, dense_dim={}, img_size={}>".format(self.model_name, 
          return self._model_name
               
      
      def __str__(self):
        return "<{}: ver={}, dense_dim={}, img_size={}>".format(self.model_name, 
                                                                version_str, 
                                                                self.ENCODER_DIM, 
                                                                "x".join([str(n) for n in self.IMAGE_SHAPE[:2]]))                
keep keep keep keep replace 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