Open liuwei16 opened 7 years ago
you may generated four files.(checkpoint,data,meta,index). so if you want run demo.py,you should modify some code of demo.py: saver = tf.train.Saver() saver.restore(sess, args.model) to saver =tf.train.Saver(write_version =saver_pb2.SaverDef.V1) ckpt =tf.train.get_checkpoint_state(args.model) print("ckpt:", ckpt) if ckpt and ckpt.model_checkpoint_path: saver.restore(sess,ckpt.model_checkpoint_path) print (' done.')
forget add "from tensorflow.core.protobuf import saver_pb2" in the beginning
@zhaoliang210325 Can you say more detail?
@zhaoliang210325 what is args.model? how can i modify it?
def parse_args(): """Parse input arguments.""" parser = argparse.ArgumentParser(description='Faster R-CNN demo') parser.add_argument('--gpu', dest='gpu_id', help='GPU device id to use [0]', default=0, type=int) parser.add_argument('--cpu', dest='cpu_mode', help='Use CPU mode (overrides --gpu)', action='store_true') parser.add_argument('--net', dest='demo_net', help='Network to use [vgg16]', default='VGGnet_test') parser.add_argument('--model', dest='model', help='Model path', default='/home/deep/tffaster/output/fs_models/voc_2007_trainval/')
args = parser.parse_args()
return args
hello?do you run successful faster rcnn with pvanet?please help me.Thanks @ruyiweicas
The error is 'Unable to open table file ./data/pretrain_model/VGGnet_fast_rcnn_iter_70000.ckpt: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?'