Closed HTaCheng closed 3 years ago
Do you continue to have this problem out of debug mode? There is a strong possibility that this is due to Overfeat giving results that put nans or infs in the similarity matrix. For example, there is issue https://github.com/craymichael/CNN_LCD/issues/1#issuecomment-450522883. It is likely this is on the Overfeat side of things.
Thank you very much for your reply. Yes, this problem exists whether it is debug mode or not. I have also seen the previous issue, but still can't find a solution.
Hi, I was able to reproduce the issue - I had forgotten what the error messages "looked" like. This is definitely the same issue as I referenced above. Unfortunately, this is an overfeat issue, and it doesn't look like they will fix it, and I am unsure what the problem is as the code used to work fine. See https://github.com/sermanet/OverFeat/issues/39. This is something I will not fix - my recommendation is that you use one of the TensorFlow slim models I describe, or find an implementation of overfeat to replace the sermanet implementation in the code. I apologize that this isn't working, and I will likely archive this project soon as the code is old and isn't planned on being maintained for new versions of libraries.
How do I get the output of this network layer structure? If I want to change the network model such as resnet-50, how can I change this?
DEFAULT_FEATURE_LAYER = { 'inception_v1': 'InceptionV1/Logits/AvgPool_0a_7x7/AvgPool:0', 'inception_v2': 'InceptionV2/Logits/AvgPool_1a_7x7/AvgPool:0', 'inception_v3': 'InceptionV3/Logits/AvgPool_1a_8x8/AvgPool:0', 'inception_v4': 'InceptionV4/Logits/AvgPool_1a/AvgPool:0', 'nasnet_large': 'final_layer/Mean:0', 'resnet_v2_152': 'resnet_v2_152/pool5:0', 'overfeat_0': 19, 'overfeat_1': 20 }
Hi, only resnet_v2_152
is available for use. You can specify this on the command-line (run main script with --help
for all options). If you really want ResNet-50, you will need to modify the code, assuming TF Slim has the model and weights you want. Add the name of the model and its metadata to the DEFAULT_FEATURE_LAYER
, MODEL_PARAMS_NAME
, and MODEL_CKPT_PATHS
dictionaries - follow the other model definitions as guidance.