dBeker / Faster-RCNN-TensorFlow-Python3

Tensorflow Faster R-CNN for Windows/Linux and Python 3 (3.5/3.6/3.7)
MIT License
612 stars 329 forks source link

there is a question when i train my own dateset #38

Closed lccate closed 5 years ago

lccate commented 6 years ago

tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [21] rhs shape= [5] [[Node: save/Assign_2 = Assign[T=DT_FLOAT, _class=["loc:@vgg_16/cls_score/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](vgg_16/cls_score/biases, save/RestoreV2_2)]]

when i run demo.py the error occurs

LarryJiang134 commented 6 years ago

I had the same problem and I solved it by changing the parameter "number of classes" of net.create_architecture in demo.py to match my dataset. Originally it was 21, and since I was using COCO, I change it to 81 and it worked.

lccate commented 6 years ago

yes!i have already sovled this problem,anyway,thank you very much!

XN-0808 commented 5 years ago

thx a lot , problem solved!