abhaydoke09 / Bilinear-CNN-TensorFlow

This is an implementation of Bilinear CNN for fine grained visual recognition using TensorFlow.
191 stars 72 forks source link

How to test the new images with the weights were saved? #28

Closed resetttttt closed 5 years ago

resetttttt commented 6 years ago

I don't know how to use the vgg16xxxfinetune100.npz file which save the weights to test my test dataset ? because i'm unfamiliar with tensorflow and i search on the web they all use akpt and pd? thank u

abhaydoke09 commented 5 years ago

@resetttttt

Follow the file bcnn_finetuning.py. It will be similar to what is being done at line 326, #print 'Creating graph' vgg = vgg16(imgs, 'vgg16_weights.npz', sess). You'll create the network graph, load the weights from .npz and just do a forward pass as it's being done in line 414

pred = sess.run(num_correct_preds, feed_dict = {imgs: batch_val_x, target: batch_val_y}) correct_val_count+=pred