dpressel / rude-carnie

Age detection in Tensorflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Age classification doesn't work

AlexDenis opened this issue · comments

Hi!
I've been trying to run age classification using
python guess.py --model_type inception --model_dir inception_weights/21936/ --filename images/sample_image.jpg,
but all I get is the following error:

InvalidArgumentError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. 
Original error:
Assign requires shapes of both tensors to match. lhs shape= [2048,8] rhs shape= [2048,2]
[[Node: save/Assign_377 = Assign[T=DT_FLOAT, _class=["loc:@output/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](output/weights, save/RestoreV2:377)]]

If I add --class_type gender to my command, gender classification works perfectly fine. Do you have any clue what might be the problem?
Thank you for your work!

Forgot to download folder with checkpoints for age (facepalm)