TensorFlow2.0-Examples icon indicating copy to clipboard operation
TensorFlow2.0-Examples copied to clipboard

YOLOv3模型训练好并保存后,再加载模型预测的输出shape变了(直接编译运行错误了)

Open WorstCodeWay opened this issue 4 years ago • 0 comments

把YOLOv3整个模型(模型和参数)训练好了保存之后,再加载之后预测的结果shape变了。不保存直接推断是3个元素的tensor。而现在是6个元素的tensor。如下:

对于一张图片的预测 训练完直接预测的输出(只有一个类别)shape [1 52 52 3 6] [1 26 26 3 6] [1 13 13 3 6]

通过加载保存好的整个模型预测的输出(只有一个类别)shape [1 52 52 18] [1 26 26 3 6] [1 13 13 18] [1 52 52 3 6] [1 26 26 3 6] [1 13 13 18]

我使用的 Tensorflow2.2 GPU版本 Ubuntu16.04LTS

WorstCodeWay avatar Aug 02 '20 13:08 WorstCodeWay