解决TypeError: argument of type ‘NoneType’ is not iterable
报错信息
Traceback (most recent call last):
File "train.py", line 216, in <module>
train.train()
File "train.py", line 123, in train
variables_to_restore = self.net.get_variables_to_restore(variables, var_keep_dic)
File "F:\Faster-RCNN-TensorFlow-Python3\lib\nets\vgg16.py", line 66, in get_variables_to_restore
if v.name.split(':')[0] in var_keep_dic:
TypeError: argument of type 'NoneType' is not iterable
解决办法

=改成vgg16.ckpt=
欢迎大家交流学习,任何问题都可以留言
此篇博客介绍了在使用TensorFlow的VGG16模型进行训练时遇到的TypeError:'NoneType' is not iterable问题,重点在于如何通过修改文件vgg16.py中的get_variables_to_restore函数来避免该错误,最终建议将checkpoint文件改为vgg16.ckpt。适合交流学习和解决类似问题的开发者阅读。
3124

被折叠的 条评论
为什么被折叠?



