他的回复:
解决方法:图像分类综合应用在进行到华为云平台训练作业时,导入数据来源时,会有路径选择,如下图:故程序文件中对于obs内存储文件的调用都以上面路径为根目录进行调用,如需调用imagenet预训练模型,需要将其放在此data文件夹中,如下图:py文件中调用方式参考:# local path local_data_path = '/cache/data/' local_output_path = '/cache/output/' local_model_path = '/cache/imagenet' model_output_path = os.path.join(local_output_path, "model") model_imagenet_path = os.path.join(local_model_path,'imagenet') if not os.path.exists(local_model_path): os.makedirs(local_model_path) if not os.path.exists(local_data_path): os.makedirs(local_data_path) if not os.path.exists(local_output_path): os.makedirs(local_output_path) # copy data to local file.copy_parallel(data_url, local_data_path) # untar data train_file = os.path.join(local_data_path, "dog_and_cat_25000.tar.gz") imagenet_model = os.path.join(local_data_path,'vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5')