mikeyEcology / MLWIC2

Classify camera trap images using machine learning with R Shiny Apps
36 stars 17 forks source link

Error #13

Closed cdhasselerharm closed 4 years ago

cdhasselerharm commented 4 years ago

Hi there. I'm attempting to retrain the species_model with my own data and i keep getting this error:

Original error: Assign requires shapes of both tensors to match. lhs shape= [59] rhs shape= [1000]

I can classify the same data using the species_model. It doesn't work with retrain=FALSE either

What would cause this?

Cheers Chris

mikeyEcology commented 4 years ago

What did you put for num_classes?

cdhasselerharm commented 4 years ago

I've tried 59 and 58 for num_classes

On Fri., 26 Jun. 2020, 4:14 am mikey_t, notifications@github.com wrote:

What did you put for num_classes?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mikeyEcology/MLWIC2/issues/13#issuecomment-649739440, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALQT7GWE4IJZV4BT2IODR4LRYOHW3ANCNFSM4OINLGZA .

mikeyEcology commented 4 years ago

Are you running in the console or in the Shiny App? Can you paste your code into this forum?

cdhasselerharm commented 4 years ago

Error.txt

I'm using the console

mikeyEcology commented 4 years ago

what happens if you set num_classes = 1000. I know it's not right, but see if it works please.

cdhasselerharm commented 4 years ago

Oh yep that's working! Any issue with running it with this setting?

mikeyEcology commented 4 years ago

It might take a little longer to train, but it will probably be negligible. Let me know if you get predictions outside of the classes that you used for training (if you have classes 0-10, and you get a classification of 12, this would be a problem).

cdhasselerharm commented 4 years ago

Okay, I only get the error when I retrain the species_model

cdhasselerharm commented 4 years ago

Thanks @mikeyEcology

cdhasselerharm commented 4 years ago

there were no problems with predictions outside of actual classes. Thanks