-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
InvalidArgumentError: Input to reshape is a tensor wit h 84500 values, but the requested shape requires a multiple of 5070 #465
Comments
If I remember correctly, a reshape error is when the .weights and .cfg file aren't lined up correctly. The way the prografas lines to read, it returns this error. My suggestion: Unless you've fiddled with the filters while training on your own dataset, this is likely a problem with the .weights and .cfg file you're using. All useful .cfg files are already in .cfg folder so keep downloading new weights and retrying, The ones that finally worked for me were simply yolo.weights and yolo.cfg. |
Got to work! Needed to change the number of filters for the last layer using the formula `filters = num * (#classes + 5). |
@lucasharada what is num in filters = num * (#classes + 5).? |
Found the way to solve it. In my case, I didn't notice I was changing the filters in the wrong convolutional layer. To train on your own data, besides changing the number of classes, you need to modify the LAST convolutional layer on the config file. |
num is the number of prior anchors in yolo @Estapraq |
@Estapraq The num in that statement can be found under the [region] section at the end of the config file. For me, this was on line 246 in yolo.cfg, where I saw that num = 5. |
I'm trying to retrain tiny-yolo-voc to get only the
person
object. I'm using on Windows with a GTX 750 Ti. I was getting theResourceExhaustedError
, but I used--gpu 0.7
and--batch 4
, so the error is gone. Now I'm getting this error related to reshape function.How can I fix this?
The text was updated successfully, but these errors were encountered: