更新经过训练的对象检测模型以对应于 TF 更新



出于稳定性原因,我正在过渡到新版本的 TF(在主线切换到 CUDA 10 之前,我在 Ubuntu 18.04 上使用夜间 docker 构建(。 当我尝试在新版本中运行我的模型时,我收到以下错误,我认为这意味着与在旧版本上训练的模型不兼容。
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 426, in import_graph_def graph._c_graph, serialized, options) # pylint: disable=protected-access tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'explicit_paddings' not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_HALF, DT_BFLOAT16, DT_FLOAT, DT_DOUBLE]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=["SAME", "VALID"]; attr=data_format:string,default="NHWC",allowed=["NHWC", "NCHW"]; attr=dilations:list(int),default=[1, 1, 1, 1]>; NodeDef: {{node FirstStageFeatureExtractor/resnet_v1_101/resnet_v1_101/conv1/Conv2D}}. (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).

我需要做什么来更新以前训练的模型以使用新版本的 TF,还是需要继续运行该版本直到下一个培训课程?

在做了一些查看之后,必须更新图形。 由于我还没有训练检查点,因此我成功地从先前冻结的图形导出为检查点来更新图形。 python3 export_inference_graph.py --input_type image_tensor --pipeline_config_path FROZENGRAPHDIRECTORY/pipeline.config --trained_checkpoint_prefix FROZENGRAPHDIRECTORY/model.ckpt --output_directory FROZENGRAPHDIRECTORY_tfNEWTFVERSION

最新更新