#-*-coding:utf-8-*-
"""
Author: Feng Jinli
Function: Remove useless caffemodel.
Date: 04/13/2018
"""
import os
root_path = "/home/fengjl/06_tools/caffeFaceV1.0/caffeFaceV1.0/examples/mnist/"
file_name = "lenet_iter_"
file_suffix = ".caffemodel"
full_file_path = ""
for i in range(0, 20000, 10000):
full_file_path = "{}{}{}{}".format(root_path, file_name, i, file_suffix)
if(os.path.exists(full_file_path)):
os.remove(full_file_path)
根据自己的需要适当调整参数变量。
【辅助脚本】删除训练过程生成的无用model
最新推荐文章于 2022-12-15 10:16:48 发布