  # AutoEncoder base classes
  
  from lib.utils import backup_file
  
  hdf = {'encoderH5': 'encoder.h5',
         'decoder_AH5': 'decoder_A.h5',
         'decoder_BH5': 'decoder_B.h5',
 
</s> remove         (face_A,face_B) = (hdf['decoder_AH5'], hdf['decoder_BH5']) if not swapped else (hdf['decoder_BH5'], hdf['decoder_AH5'])
 </s> add         serializer = Serializer.get_serializer('json')
        state_fn = ".".join([hdf['state'], serializer.ext]) 
        try:
            with open(str(self.model_dir / state_fn), 'rb') as fp:
                state = serializer.unmarshal(fp.read().decode('utf-8'))
                self._epoch_no = state['epoch_no']
        except IOError as e:
            print('Error loading training info:', e.strerror)
            self._epoch_no = 0
        except JSONDecodeError as e:
            print('Error loading training info:', e.msg)
            self._epoch_no = 0   
        
        (face_A,face_B) = (hdf['decoder_AH5'], hdf['decoder_BH5']) if not swapped else (hdf['decoder_BH5'], hdf['decoder_AH5'])                
 </s> remove        'decoder_BH5': 'decoder_B.h5'}
 </s> add        'decoder_BH5': 'decoder_B.h5',
       'state': 'state'}
 </s> remove         print("[{0}] [#{1:05d}] loss_A: {2:.5f}, loss_B: {3:.5f}".format(time.strftime("%H:%M:%S"), iter, loss_A, loss_B),
 </s> add         
        self.model._epoch_no += 1
        
        print("[{0}] [#{1:05d}] loss_A: {2:.5f}, loss_B: {3:.5f}".format(time.strftime("%H:%M:%S"), self.model.epoch_no, loss_A, loss_B),

from lib import Serializer
from json import JSONDecodeError

  # AutoEncoder base classes
  
  from lib.utils import backup_file
from lib import Serializer
from json import JSONDecodeError
  
  hdf = {'encoderH5': 'encoder.h5',
         'decoder_AH5': 'decoder_A.h5',
         'decoder_BH5': 'decoder_B.h5',
keep keep add keep keep keep keep
 - added saving of current epoch number during save_weights (#468) 
plugins/Model_Original/AutoEncoder.py