These are chat archives for arita37/tensorflow

19th
Feb 2018
reihaneh-torkzadehmahani
@reihaneh-torkzadehmahani
Feb 19 2018 12:01

Hi,
I'm going to evaluate a pretrained model on flowers dataset, using the following command (by TF-slim):

python eval_image_classifier.py --alsologtostderr --checkpoint_path=/home/reihaneh/Apps/Tensorflow/models/research/slim/mobilenet_v1_1.0_224.ckpt --dataset_dir=${DATA_DIR} --dataset_name=flowers --dataset_split_name=validation --model_name=mobilenet_v1

But I get the following error:

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [1,1,1024,5] rhs shape= [1,1,1024,1001]
[Node: save/Assign_136 = Assign[T=DT_FLOAT, _class=["loc:@MobilenetV1/Logits/Conv2d_1c_1x1/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

I also tried it with other models but the error is the same.
(For all models that I've tested, If I set --labels_offset=-996 it runs with accuracy=0, it seems it sets the number of classes to 10001 some where!!)

Do you have any ideas?

Thanks in advance,
Reihaneh