>>>res_home = '/vip_data_center/test_envs/trainer/resource' >>>model_name = 'caffe_models' >>>nn_name = 'lenet' >>>res_dir = os.path.join(res_home, model_name, nn_name) >>>quantize_path = glob.glob(os.path.join(res_dir, '*.quantize')) >>>quantize_path ['/vip_data_center/test_envs/trainer/resource/caffe_models/lenet/lenet_a.quantize'] >>>quantize_path = glob.glob(os.path.join(res_dir, '*.quantize'))[-1] >>>quantize_path 'vip_data_center/test_envs/trainer/resource/caffe_models/lenet/lenet_a.quantize'
glob.glob 匹配文件
猜你喜欢
转载自www.cnblogs.com/sayiqiu/p/10594747.html
今日推荐
周排行