I tried to install via the following commands on my Mac (MacBook Pro (13-inch, 2016), macOS Mojave Version 10.14)
cd .../anaconda/lib/python3.5/site-packages
cd tensorflow
git clone https://github.com/tensorflow/models.git
cd models
cd research
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
python deeplab/model_test.py
After giving this warning,
I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Terminal shows this message to me
F....
======================================================================
FAIL: testBuildDeepLabWithDensePredictionCell (__main__.DeeplabModelTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "deeplab/model_test.py", line 141, in testBuildDeepLabWithDensePredictionCell
expected_endpoints)
AssertionError: First sequence is not a list: dict_keys(['merged_logits'])
----------------------------------------------------------------------
Ran 5 tests in 18.835s
Is Anaconda triggering the problem for me?
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
What is the top-level directory of the model you are using
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce
Hi, thank you for the quick reply. For some of the questions, I can provide an answer:
pip install tensorflow
cd /Users/my own username/anaconda/lib/python3.5/site-packages
cd tensorflow
git clone https://github.com/tensorflow/models.git
cd models
cd research
export PYTHONPATH=$PYTHONPATH:pwd
:pwd
/slim
python deeplab/model_test.py
I guess you use python>=3.0 , therefore the code in model_test.py line: 140
self.assertListEqual(scales_to_model_results.keys(),
can not work.
change it to self.assertListEqual(list(scales_to_model_results.keys()),
detail see the model_test.py history https://github.com/tensorflow/models/commit/834902277b8d9d38ef9982180aadcdaa0e5d24d3#diff-046f4d20ab75f920be0e2ab2dc352a91
Wow! Was tensorflow 1.11.0 written in python2 ?? I certainly did not look at that.
Do you mean the model_test.py was written in py27?
So do I need to run the DeepLab in Python 2.7?
I'm using Python 3.6, and following @myBestLove 's instructions, was able to, successfully, run model_test.py. There's two instances where you need to change the line. Just replace scales_to_model_results.keys()
with list(scales_to_model_results.keys())
.
I had a similar error earlier but then changing the two instances I got a different error that is
self.assertListEqual(list(scales_to_model_results.keys()),1)
AssertionError: Second sequence is not a list: 1
Same configs as [syin3]
I have solved it with the method by @DrFrazerNoble
Closing as this is resolved
Solved @myBestLove
@reetc i have use deeplab r1.12.0 and after repalced problem solved
well,thank your help ! @myBestLove
Most helpful comment
I guess you use python>=3.0 , therefore the code in model_test.py line: 140
self.assertListEqual(scales_to_model_results.keys(),
can not work.
change it to
self.assertListEqual(list(scales_to_model_results.keys()),
detail see the model_test.py history https://github.com/tensorflow/models/commit/834902277b8d9d38ef9982180aadcdaa0e5d24d3#diff-046f4d20ab75f920be0e2ab2dc352a91