def save(self, save_path):
    model_prefix = os.path.join(save_path, 'deepfm')
    print('Save model...', save_path, file=sys.stderr)
    self.saver.save(self.sess, model_prefix)
    if (self._config is not None):
        config_path = os.path.join(save_path, 'config.json')
        with open(config_path, 'w') as fp:
            json.dump(fp)
    print('Save model done.', save_path, file=sys.stderr)
def save(self, save_path):
    model_prefix = os.path.join(save_path, 'deepfm')
    print('Save model...', save_path, file=sys.stderr)
    self.saver.save(self.sess, model_prefix)
    if (self._config is not None):
        config_path = os.path.join(save_path, 'config.json')
        with open(config_path, 'w') as fp:
            json.dump(fp)
    print('Save model done.', save_path, file=sys.stderr)