diff --git a/paddlepalm/downloader.py b/paddlepalm/downloader.py index e33ee7a34540ec773c0ff1fefb8906d6384385d5..8110ef2cb66fe78bcf3400da8550ad7ac1baa9f7 100644 --- a/paddlepalm/downloader.py +++ b/paddlepalm/downloader.py @@ -113,11 +113,9 @@ def _convert(path, silent=False): for root, dirs, files in os.walk(path + '/params1/'): for file in files: src_file = os.path.join(root, file) - newname = path + '/params1/' + '__paddlepalm_' + file - os.rename(src_file, newname) - tar_model.add(newname) - tar_info.write(newname) - os.remove(newname) + tar_model.add(src_file, '__paddlepalm_' + file) + tar_info.write('__paddlepalm_' + file) + os.remove(src_file) tar_model.close() tar_info.close() os.removedirs(path + '/params1/')