tensorflow1.x报错!!!!

我在一种程序中使用了同一个CNN网络的分类和回归两种模型,然后出现以下错误
tensorflow.python.framework.errors_impl.InvalidArgumentError: Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
Assign requires shapes of both tensors to match. lhs shape= [2] rhs shape= [1]

这个看起来是 类别数量不匹配, 要研究你训练数据。
看看代码来源对应的数据文件结构。