ssd-keras
ssd-keras copied to clipboard
训练完后运行predict.py时在load_weights()时出错
训练自己的数据,完后进行预测时在load_weights()时shape不对,ValueError: Layer #32 (named "conv4_3_norm_mbox_conf"), weight <tf.Variable 'conv4_3_norm_mbox_conf/kernel:0' shape=(3, 3, 512, 8) dtype=float32_ref> has shape (3, 3, 512, 8), but the saved weight has shape (4, 512, 3, 3),我的keras是2.3.1,K.image_data_format的问题我在训练前就改过来了,请问是什么原因呢?
我看了下,训练的时候传入的NUM_CLASSES是class,但是predict中却是class+1, 我把predict中的也改为class后可以正常load_weights,但是检测出来没有框,阈值设置为0.1都没有,请问何解?
训练的时候传入进去的num_classes应该是分类数量+1
是一开始就是NUM_CLASSES=class + 1还是说只是模型构建的时候+1,前面的BBoxUtility传入的也需要+1吗?
一开始的就+1,可以出结果了,多谢!
嗯
@bubbliiiing 博主你好,请问这个predict.py文件是没写全吗?还有就是ssd.detect_image(image)是再项目中吗?谢谢
@Andy457 你好,你是运行predict.py文件去测试的吗?
你要不看看视频把
@Andy457 你好,你是运行predict.py文件去测试的吗?
训练自己的数据,完后进行预测时在load_weights()时shape不对,ValueError: Layer #32 (named "conv4_3_norm_mbox_conf"), weight <tf.Variable 'conv4_3_norm_mbox_conf/kernel:0' shape=(3, 3, 512, 8) dtype=float32_ref> has shape (3, 3, 512, 8), but the saved weight has shape (84, 512, 3, 3),,请问是什么原因呢?输入是class+1,没问题
训练自己的数据,完后进行预测时在load_weights()时shape不对,ValueError: Layer #32 (named "conv4_3_norm_mbox_conf"), weight <tf.Variable 'conv4_3_norm_mbox_conf/kernel:0' shape=(3, 3, 512, 8) dtype=float32_ref> has shape (3, 3, 512, 8), but the saved weight has shape (84, 512, 3, 3),,请问是什么原因呢?输入是class+1,没问题
classes path没改
路径都改了,找不到问题
那就是训练的时候没改
那我重新训练试试
博主救救救,重新训练了还是不行,而且ssd和rfb都是一样的问题
你总有一个没改!!= = classes_path