  # AutoEncoder base classes
  
  import os, shutil
  
  encoderH5 = 'encoder.h5'
  decoder_AH5 = 'decoder_A.h5'
  decoder_BH5 = 'decoder_B.h5'
  
  class AutoEncoder:
      def __init__(self, model_dir, gpus):
          self.model_dir = model_dir
          self.gpus = gpus
 
</s> remove import os, shutil
 </s> add from lib.utils import backup_file </s> remove import os, shutil
 </s> add from lib.utils import backup_file </s> remove         if os.path.isdir(model_dir + "_bk"):
            shutil.rmtree(model_dir + "_bk")
        shutil.move(model_dir,  model_dir + "_bk")
        os.mkdir(model_dir)
 </s> add         for model in hdf.values():
            backup_file(model_dir, model)

hdf = {'encoderH5': 'encoder.h5',
       'decoder_AH5': 'decoder_A.h5',
       'decoder_BH5': 'decoder_B.h5'}

  # AutoEncoder base classes
  
  import os, shutil
  
hdf = {'encoderH5': 'encoder.h5',
       'decoder_AH5': 'decoder_A.h5',
       'decoder_BH5': 'decoder_B.h5'}
hdf = {'encoderH5': 'encoder.h5',
       'decoder_AH5': 'decoder_A.h5',
       'decoder_BH5': 'decoder_B.h5'}
hdf = {'encoderH5': 'encoder.h5',
       'decoder_AH5': 'decoder_A.h5',
       'decoder_BH5': 'decoder_B.h5'}
  
  class AutoEncoder:
      def __init__(self, model_dir, gpus):
          self.model_dir = model_dir
          self.gpus = gpus
keep keep keep keep replace replace replace keep keep keep keep keep
 Model backup bugfix (#371)

* model backup bugfix - original model

* Model backup bugfix - remaining models 
plugins/Model_Original/AutoEncoder.py