Comments (9)
Try to upgrade matplotlib:
pip3 install --upgrade matplotlib
from tensorflow-mnist-tutorial.
I had the same problem, but I upgraded matplotlib to the last version via pip and it seems to work.
from tensorflow-mnist-tutorial.
The reason is that on Linux, you need to install matplotlib with apt-get because that also pulls in the graphics backend on which matplotlib relies.
But unfortunately, the version of martplotlib you get is not the freshest.
from tensorflow-mnist-tutorial.
after upgrading the matplotlib according to @martin-gorner advice, the problem disappeared:
$ pip3 install --upgrade matplotlib
Collecting matplotlib
Downloading matplotlib-2.0.0-1-cp35-cp35m-manylinux1_x86_64.whl (14.7MB)
100% |████████████████████████████████| 14.7MB 100kB/s
Collecting cycler>=0.10 (from matplotlib)
Downloading cycler-0.10.0-py2.py3-none-any.whl
Collecting six>=1.10 (from matplotlib)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting python-dateutil (from matplotlib)
Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194kB)
100% |████████████████████████████████| 194kB 322kB/s
Collecting numpy>=1.7.1 (from matplotlib)
Using cached numpy-1.12.0-cp35-cp35m-manylinux1_x86_64.whl
Collecting pyparsing!=2.0.0,!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 (from matplotlib)
Downloading pyparsing-2.1.10-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 484kB/s
Collecting pytz (from matplotlib)
Downloading pytz-2016.10-py2.py3-none-any.whl (483kB)
100% |████████████████████████████████| 491kB 303kB/s
Installing collected packages: six, cycler, python-dateutil, numpy, pyparsing, pytz, matplotlib
Successfully installed cycler-0.10.0 matplotlib-2.0.0 numpy-1.12.0 pyparsing-2.1.10 python-dateutil-2.6.0 pytz-2016.10 six-1.10.0
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
from tensorflow-mnist-tutorial.
@martin-gorner I suggest that It is better to put the "matplotlib upgrade" step into INSTALL.txt.
from tensorflow-mnist-tutorial.
Collecting matplotlib
Downloading matplotlib-2.0.2-cp35-cp35m-manylinux1_x86_64.whl (14.6MB)
100% |████████████████████████████████| 14.6MB 76kB/s
Requirement already up-to-date: numpy>=1.7.1 in /usr/local/lib/python3.5/dist-packages (from matplotlib)
Collecting pyparsing!=2.0.0,!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 (from matplotlib)
Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 2.7MB/s
Requirement already up-to-date: six>=1.10 in /usr/lib/python3/dist-packages (from matplotlib)
Collecting cycler>=0.10 (from matplotlib)
Downloading cycler-0.10.0-py2.py3-none-any.whl
Collecting python-dateutil (from matplotlib)
Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194kB)
100% |████████████████████████████████| 194kB 2.0MB/s
Collecting pytz (from matplotlib)
Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)
100% |████████████████████████████████| 491kB 530kB/s
Installing collected packages: pyparsing, cycler, python-dateutil, pytz, matplotlib
Found existing installation: pyparsing 2.0.3
Not uninstalling pyparsing at /usr/lib/python3/dist-packages, outside environment /usr
Found existing installation: cycler 0.9.0
Not uninstalling cycler at /usr/lib/python3/dist-packages, outside environment /usr
Found existing installation: python-dateutil 2.4.2
Have checked it too
Requirement already up-to-date: matplotlib in /usr/local/lib/python3.5/dist-packages
Requirement already up-to-date: pyparsing!=2.0.0,!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /usr/local/lib/python3.5/dist-packages (from matplotlib)
Requirement already up-to-date: pytz in /usr/local/lib/python3.5/dist-packages (from matplotlib)
Requirement already up-to-date: cycler>=0.10 in /usr/local/lib/python3.5/dist-packages (from matplotlib)
Requirement already up-to-date: python-dateutil in /usr/local/lib/python3.5/dist-packages (from matplotlib)
Requirement already up-to-date: six>=1.10 in /usr/lib/python3/dist-packages (from matplotlib)
Requirement already up-to-date: numpy>=1.7.1 in /usr/local/lib/python3.5/dist-packages (from matplotlib)
still same issue
Ankita/tfwork/try/tensorflow-mnist-tutorial$ python mnist_2.0_five_layers_sigmoid.py
Tensorflow version 1.1.0
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):
File "mnist_2.0_five_layers_sigmoid.py", line 86, in
datavis = tensorflowvisu.MnistDataVis()
File "/home/tensorflow/Ankita/tfwork/try/tensorflow-mnist-tutorial/tensorflowvisu.py", line 166, in init
self._color4 = self.__get_histogram_cyclecolor(histogram4colornum)
File "/home/tensorflow/Ankita/tfwork/try/tensorflow-mnist-tutorial/tensorflowvisu.py", line 160, in __get_histogram_cyclecolor
colors = clist.by_key()['color']
AttributeError: 'Cycler' object has no attribute 'by_key'
from tensorflow-mnist-tutorial.
请问这个问题 怎么解决了
from tensorflow-mnist-tutorial.
@showforj I have commented the __get_histogram_cyclecolor invoking in init and do some hard coding to self._color4 and self._color5:
def __init__(self, title1=None, title2=None, title3=None, title4=None, title5=None, title6=None, histogram4colornum=None, histogram5colornum=None, dpi=70):
#self._color4 = self.__get_histogram_cyclecolor(histogram4colornum)
#self._color5 = self.__get_histogram_cyclecolor(histogram5colornum)
self._color4 = '#CFF57F'
self._color5 = '#E6C54A'
from tensorflow-mnist-tutorial.
Problem fixed by updating matplotlib as per martin-gorner sugestion. Thanks.
from tensorflow-mnist-tutorial.
Related Issues (20)
- max test accuracy: 0 HOT 5
- Empty plots HOT 6
- line 37 (3.0, 3.1, 4.2) HOT 1
- cross_entropy * 100 HOT 2
- Guide for Installing TensorFlow and Python 3.5 on Windows HOT 2
- BatchNorm is not in 'test mode' inside update_train_data HOT 2
- Error in mnist_1.0_softmax.py file HOT 4
- Doesn't work with latest pandas 0.20.1 and 0.20.2 HOT 4
- Issue with OSX HOT 2
- Examples are running very slow on AWS HOT 1
- _tkinter.TclError: no display name and no $DISPLAY environment variable HOT 1
- error while compiling the model HOT 1
- How to visualize? HOT 1
- How about tf.contrib.layers.batch_norm ? HOT 1
- Error occured when trying to run the script mnist_1.0_softmax.py HOT 1
- How to run on GPU? HOT 2
- how to download slides HOT 1
- Prediction is missing HOT 1
- Question related to compatible_convolutional_noise_shape function. HOT 1
- Point classification using DNN HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow-mnist-tutorial.