Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get expected rpn_out_class to have shape .... #7

Open
gloddream opened this issue Nov 22, 2017 · 3 comments
Open

get expected rpn_out_class to have shape .... #7

gloddream opened this issue Nov 22, 2017 · 3 comments

Comments

@gloddream
Copy link

i used my own train data. get errors:

Num classes (including bg) = 17
Num train samples 2125
Num val samples 394
loading weights from ./model/resnet50_weights_tf_dim_ordering_tf_kernels.h5
Unable to open file (Unable to open file: name = './model/kitti_frcnn_last.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
Could not load pretrained model weights. Weights can be found in the keras application folder https://github.com/fchollet/keras/tree/master/keras/applications
Starting training
Epoch 1/3000
## Exception: Error when checking target: expected rpn_out_class to have shape (None, None, None, 9) but got array with shape (1, 38, 42, 18)

@sanyuwen
Copy link

sanyuwen commented Dec 7, 2017

I hava encounter this error too!
how do you solve it ?

Num classes (including bg) = 21
Num train samples 4191
Num val samples 805
loading weights from ./model/resnet50_weights_tf_dim_ordering_tf_kernels.h5
"Unable to open object (object 'bias:0' doesn't exist)"
Could not load pretrained model weights. Weights can be found in the keras application folder https://github.com/fchollet/keras/tree/master/keras/applications
Starting training
Epoch 1/3000
Exception: Error when checking target: expected rpn_out_class to have shape (None, None, None, 9) but got array with shape (1, 38, 50, 18)

I plan to train it in VOC2007 data.

@hadarpo
Copy link

hadarpo commented Jan 16, 2018

One should change the rpn and cls moels architectures so that the output is concatanted to itself. the reason is that keras does not allow different sizes of y_true and y_pred. you have to change the losses accordingly

@clovermini
Copy link

@hadarpo I got the same question, but I do not particularly understand what you mean. Can you say more in detail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants