Tensorflow error : Assign requires shapes of both tensors to match

来源:互联网 发布:arp欺骗工具 windows 编辑:程序博客网 时间:2024/05/22 13:57

When training faster-rcnn model for object detection job (I have used a third-party tensorflow  version:  https://github.com/endernewton/tf-faster-rcnn)


Met the error :


ERROR MESSAGE
InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [1000] rhs shape= [1001]
[[Node: save/Assign_8 = Assign[T=DT_FLOAT, _class=["loc:/Conv2d_2b_1x1/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/cpu:0"](InceptionV3/AuxLogits/Conv2d_2b_1x1/biases, save/RestoreV2_8)]]


According to the discussion here :https://github.com/tensorflow/tensorflow/issues/6883


Just delete the previous files in the output folder


error 2:IndexError: list index out of range

File "./tools/train_net.py", line 85, in roidb = get_training_roidb(imdb)File "/usr/local/fast-rcnn/tools/../lib/fast_rcnn/train.py", line 111, in get_training_roidbrdl_roidb.prepare_roidb(imdb)File "/usr/local/fast-rcnn/tools/../lib/roi_data_layer/roidb.py", line 23, in prepare_roidbroidb[i]['image'] = imdb.image_path_at(i)IndexError: list index out of range

error2 解决办法:

删除fast-rcnn-master/data/cache/ 文件夹下的.pkl文件,或者改名备份,重新训练即可


阅读全文
0 0