error in model_builder_test.py
I've tried all steps of object_detection model installation mentioned @ https://github.com/tensorflow/models/blob/master/object_detection/g3doc/installation.md
While testing the installation as mentioned in last step of article, I am getting below error.
ERROR: test_create_ssd_mobilenet_v1_model_from_config (main.ModelBuilderTest)
Traceback (most recent call last): File "/Users/RonakBhavsar/eDAM/ML/ObjectRecognition/models/object_detection/builders/model_builder_test.py", line 193, in test_create_ssd_mobilenet_v1_model_from_config model = self.create_model(model_proto) File "/Users/RonakBhavsar/eDAM/ML/ObjectRecognition/models/object_detection/builders/model_builder_test.py", line 53, in create_model return model_builder.build(model_config, is_training=False) File "/Users/RonakBhavsar/eDAM/ML/ObjectRecognition/models/object_detection/builders/model_builder.py", line 73, in build return _build_ssd_model(model_config.ssd, is_training) File "/Users/RonakBhavsar/eDAM/ML/ObjectRecognition/models/object_detection/builders/model_builder.py", line 126, in _build_ssd_model is_training) File "/Users/RonakBhavsar/eDAM/ML/ObjectRecognition/models/object_detection/builders/model_builder.py", line 98, in _build_ssd_feature_extractor feature_extractor_config.conv_hyperparams, is_training) File "/Users/RonakBhavsar/eDAM/ML/ObjectRecognition/models/object_detection/builders/hyperparams_builder.py", line 70, in build hyperparams_config.regularizer), File "/Users/RonakBhavsar/eDAM/ML/ObjectRecognition/models/object_detection/builders/hyperparams_builder.py", line 119, in _build_regularizer return slim.l2_regularizer(scale=regularizer.l2_regularizer.weight) File "/Users/RonakBhavsar/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/regularizers.py", line 92, in l2_regularizer raise ValueError('scale cannot be an integer: %s' % (scale,)) ValueError: scale cannot be an integer: 1
I get this error for all the models mentioned in the test script. Any ideas?
@ronakmb, could you report what version of Python, Tensorflow and protoc you're using?
Hi derekjchow,
I tried with python2 and python3, both giving same error. with python 2.7 (/anaconda2/bin/python) I've TF 1.1.0 with python 3.5 (/Library/Frameworks/Python.framework/Versions/3.5/bin/python3) I've TF 1.0.1 The protoc in path (/usr/local/bin) seems to be (libprotoc 2.4.1) but i explicitly install protoc 2.6.1 which has got installed at /usr/local/Cellar/protobuf/2.6.1.
Do you think, it is because multiple set up of python and protoc?
Thanks,
I'm getting the same scale cannot be an integer problems, with TF 1.2.0
libprotoc 2.6.0
Python 3.6.0
Hi Andrew!
@ronakmb , @andrew-anki - I'm pretty sure this is an issue with the proto version as we haven't had issues with more recent proto versions. I have a fix that I'll hopefully add by EOD.
Hi Jon! Saw you were a dev on this... very cool. Thanks for the help!
@jch1 In the mean time, should we just update protobufs to something newer? I only installed 2.6 because the installation instructions say that's the version dependency.
I replaced my protoc version with 2.6.1 as mentioned in the installation document (so that I just have one protoc version on my system). Still getting the same error.
@jch1 - I would wait for the fix
@jch1 Note that I did just try updating to protobuf version 3.3.0 and am still getting the same error
Thanks for the info @andrew-anki - maybe I'm wrong about the proto version? Are you running on a mac by any chance?
Can you try the fix I just added? (#1707) --- I was able to reproduce this problem on the mac and this fixed it for me.
@jch1 I am on a mac. Will pull your fix and report back.
woohoo! that nailed it. Thanks!
> python3 object_detection/builders/model_builder_test.py
.......
----------------------------------------------------------------------
Ran 7 tests in 0.045s
OK
.......
Ran 7 tests in 0.034s
OK
Great. Thanks @jch1
Awesome, I will close this for now. Good luck on your detection endeavors!
@jch1 Thank you so much!