There is a squeezenet.py in a model directory.
Could you please share pre-train model for squeezenet architecture?
what is the LFW accuracy.
@davidsandberg I would be grateful if you could consider my above question.
@Alireza-Akhavan
I have trained a model of squeezenet on VGG Face 2 Dataset.

Here is the result after running validation on LFW:
Model directory: ../models/20180204-160909
Metagraph file: model-20180204-160909.meta
Checkpoint file: model-20180204-160909.ckpt-266000
Runnning forward pass on LFW images
Accuracy: 0.982+-0.008
Validation rate: 0.91933+-0.02102 @ FAR=0.00133
Area Under Curve (AUC): 0.998
Equal Error Rate (EER): 0.017
You can download it here if you find it useful.
https://drive.google.com/file/d/1phGtQBEAh8L2GsKXByagD1sLQnFQ8hjd/view?usp=sharing
How did you freeze graph of SqueezeNet architecture and export to .pb file?
@yipsang
Thanks for sharing your pretrained squeeze net, it's a great achievement
It would be very helpful if you could share the way you trained the squeeze net
You trained it with softmax or triplet loss ?
How about the learning rate ?
What's the optimizer ?
Thanks advance
Hi @yipsang ,
I am so thankful for your cooperation.
As @hgffly asked, could you please give me more information about the train information?
You have used softmax or triplet loss ? and about parameters like LR?
Thanks
Hi @yipsang I tried your model, but met with following issue:
FailedPreconditionError (see above for traceback): Attempting to use uninitialized value squeezenet/conv1/BatchNorm/beta
[[Node: squeezenet/conv1/BatchNorm/beta/read = Identity[T=DT_FLOAT, _class=["loc:@squeezenet/conv1/BatchNorm/beta"], _device="/job:localhost/replica:0/task:0/device:CPU:0"](squeezenet/conv1/BatchNorm/beta)]]
update the freeze_graph.py a bit, and now the model provided by @yipsang could work successfully.
@hgffly @Alireza-Akhavan
I used center loss to train. And here is the hyperparameters I've used:
--keep_probability 0.8 --max_nrof_epochs 2000 --weight_decay 5e-5 --random_crop --random_flip --learning_rate_decay_factor 0.5 --learning_rate 0.1 --learning_rate_decay_epochs 25 --center_loss_factor 1e-2 --center_loss_alfa 0.9 --optimizer RMSPROP
@zhenglaizhang I haven't come across with the error you had before, glad to hear you've solved it.
@yipsang Have you ever tried to train MobileNet or ShuffelNet?
@yipsang , very thankful for your sharing
@zhenglaizhang I also have your problem. How did you solve that? Thank you very much.
Same problem as @zhenglaizhang and @karlTUM . Using the checkpoints (not .pb file) works, but the accuracy is very poor (compared to the standard model) for my use case (for now, basically just comparing ten members of the office) - though I do get similar LFW numbers when I validate it.
From what I can tell, this is using the euclidean distance - though oddly, these distances are on the order of 1e-3 instead of more like 1e-1 for the current model, which makes me think something might be off.
Hi @yipsang , thanks for great work.
Can you explain a bit more about face alignment, --image_size, --margin information when training with VGGFace2.
Thank you.
I'm very new to all of this tensorflow, training, and freezing. I'm attempting to compile the trained squeezenet graph provided in this issue to run on the Google AIY Vision Kit.
Using their compiler I've tried running this command:
./bonnet_model_compiler.par --frozen_graph_path 20180204-160909/20180204-16090.pb --output_graph_path vggface2_sqeezenet.binaryproto --input_tensor_name input --output_tensor_names embeddings --input_tensor_size 160 --debug
But I'm getting this error:
2018-06-24 19:57:47.448345: I external/org_tensorflow/tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before Removing unused ops: 1207 operators, 1562 arrays (0 quantized)
2018-06-24 19:57:47.484325: I external/org_tensorflow/tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before general graph transformations: 1207 operators, 1562 arrays (0 quantized)
2018-06-24 19:57:47.526755: I external/org_tensorflow/tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] After general graph transformations pass 1: 989 operators, 1360 arrays (0 quantized)
2018-06-24 19:57:47.564350: I external/org_tensorflow/tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before dequantization graph transformations: 989 operators, 1360 arrays (0 quantized)
2018-06-24 19:57:47.586820: F external/org_tensorflow/tensorflow/contrib/lite/toco/toco_tooling.cc:46] Check failed: unsupported_ops.empty() These unsupported ops were not removed by graph transformations: Prod, Reciprocal, SquaredDifference, VariableV2
I've tried looking up the unsupported_ops.empty() online, but could not parse what was needed to be done to get past this error (or if anything could be done). I'm not even sure if I'm running the compiler on the correct file, or if I need to freeze the graph (or is the 20180204-16090.pb file the already frozen graph)...
Thanks for any help
How to define squeezenet model in model_def?
when i am giving --model_def models.squeezenet it is giving me this error
train_softmax.py: error: unrecognized arguments: models.squeezenet
I am new to this.Please help
Hi,
@yipsang i tried to convert 20180204-16090.pb into .binaryproto for AIY vision tool kit ,
where it is showing error :
Check failed: unsupported_ops.empty() These unsupported ops were not removed by graph transformations: FIFOQueueV2, Prod, QueueDequeueUpToV2, Reciprocal, SquaredDifference, VariableV2
How to resolve it ??
Thanks,
update the freeze_graph.py a bit, and now the model provided by @yipsang could work successfully.
Can you please share what you changed to make the model working?
@tfabio In freeze_graph.py you have to add this line in whitelist_names,
node.name.startswith('squeezenet'))
@zhenglaizhang :
I have the same error of "Attempting to use uninitialized value".
How did you solve this problem?
The error message as following :
FailedPreconditionError (see above for traceback): Attempting to use uninitialized value squeezenet/conv1/weights
[[Node: squeezenet/conv1/weights/read = Identity[T=DT_FLOAT, _class=["loc:@squeezenet/conv1/weights"], _device="/job:localhost/replica:0/task:0/device:GPU:0"](squeezenet/conv1/weights)]]
Thanks for your help.
Most helpful comment
@Alireza-Akhavan
I have trained a model of squeezenet on VGG Face 2 Dataset.
Here is the result after running validation on LFW:
You can download it here if you find it useful.
https://drive.google.com/file/d/1phGtQBEAh8L2GsKXByagD1sLQnFQ8hjd/view?usp=sharing