Update again! This material has been migrated to tensorflow.org/tutorials.
random-forests / tensorflow-workshop Goto Github PK
View Code? Open in Web Editor NEWSlides and code from our TensorFlow workshop.
License: Apache License 2.0
Slides and code from our TensorFlow workshop.
License: Apache License 2.0
Update again! This material has been migrated to tensorflow.org/tutorials.
I kept printing out this error when running Python 2.7
`---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
in ()
1 import numpy as np
----> 2 import matplotlib.pyplot as plt
3 get_ipython().magic(u'matplotlib inline')
4 import tensorflow as tf
5 learn = tf.contrib.learn
/Users/erinpangilinan/anaconda2/envs/tensorflow/lib/python2.7/site-packages/matplotlib/pyplot.py in ()
112
113 from matplotlib.backends import pylab_setup
--> 114 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
115
116 _IP_REGISTERED = None
/Users/erinpangilinan/anaconda2/envs/tensorflow/lib/python2.7/site-packages/matplotlib/backends/init.pyc in pylab_setup()
30 # imports. 0 means only perform absolute imports.
31 backend_mod = import(backend_name,
---> 32 globals(),locals(),[backend_name],0)
33
34 # Things we pull in from all backends
/Users/erinpangilinan/anaconda2/envs/tensorflow/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py in ()
22
23 import matplotlib
---> 24 from matplotlib.backends import _macosx
25
26
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are Working with Matplotlib in a virtual enviroment see 'Working with Matplotlib in Virtual environments' in the Matplotlib FAQ`
I seemed to have several issues with the cloud install. Specifically getting the docker running and code cloned:
After running docker run -it -p 8888:8888 -p 6006:6006 tensorflow/tensorflow bash
, then inside the container I am unable to clone the git repository:
root@bd70aea44e99:/notebooks# git clone https://github.com/random-forests/tensorflow-workshop.git
bash: git: command not found
Later when I try to run jupyter notebook, that doesn't seem to work either:
root@bd70aea44e99:/notebooks# jupyter notebook
[W 16:41:22.749 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[C 16:41:22.756 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.
root@bd70aea44e99:/notebooks#
Thanks in advance for the setup help.
At step 7 in https://github.com/random-forests/tensorflow-workshop/blob/master/setup/install-docker-cloud.md, bash responds with git: command not found
I landed here from https://www.youtube.com/watch?v=d12ra3b_M-0 - I wonder if this tutorial are updated for TF2 ?! or any place to find the TF2 compatible edition ?
Thanks.
While running R.fit(x_data, y_data, batch_size=100, max_steps=1000)
and D.fit(x_data, y_data, batch_size=100, max_steps=1000)
in https://github.com/random-forests/tensorflow-workshop/blob/master/2b_regression_tf_learn.ipynb, I get the following error.
TypeError: fit() got an unexpected keyword argument 'max_steps'
Changing it to just steps
allowed it to run without error.
Tried going through the code, and it looks like max_steps
should be a valid parameter. This is with tensorflow==0.9.0 on OSX, Anaconda python 2.7.11.
Hi Josh,
Thanks for sharing the notebooks! In the "07_structured_data", it states that "Using TensorFlow 1.4, the below can be written using regular Python code to parse the CSV file, via the Datasets. from_generator() method. This improves producivity a lot - it means you can use Python to read, parse, and apply whatever logic you wish to your input data - then you can take advantage of the reusable pieces of the Datasets API (e.g., batch, shuffle, repeat, etc) - as well as the optional performance tuning (e.g., prefetch, parallel process, etc).
In combination with Estimators, this means you can train and tune deep models at scale on data of almost any size, entirely using a high-level API. I'll update this notebook after v1.4 is released with an example. It's neat."
Now that v1.4 is released. Would you be updating this part of the notebook? Is so, when would you expect it complete? Thanks.
I kept printing out this error when running Python 2.7 and anaconda, was not able to load data here, but on other parts of Juptyer Notebook it ran.
`---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
in ()
1 import numpy as np
----> 2 import matplotlib.pyplot as plt
3 get_ipython().magic(u'matplotlib inline')
4 import tensorflow as tf
5 learn = tf.contrib.learn
/Users/user/anaconda2/envs/tensorflow/lib/python2.7/site-packages/matplotlib/pyplot.py in ()
112
113 from matplotlib.backends import pylab_setup
--> 114 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
115
116 _IP_REGISTERED = None
/Users/user/anaconda2/envs/tensorflow/lib/python2.7/site-packages/matplotlib/backends/init.pyc in pylab_setup()
30 # imports. 0 means only perform absolute imports.
31 backend_mod = import(backend_name,
---> 32 globals(),locals(),[backend_name],0)
33
34 # Things we pull in from all backends
/Users/erinpangilinan/anaconda2/envs/tensorflow/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py in ()
22
23 import matplotlib
---> 24 from matplotlib.backends import _macosx
25
26
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are Working with Matplotlib in a virtual enviroment see 'Working with Matplotlib in Virtual environments' in the Matplotlib FAQ`
thanks, for the great workshop. can you please share the link to workshop?
In the 4_mnist_low_level
notebook, if you uncomment the code in the 2nd code block, you will get a NameError
. You are loading the mnist
in the 3rd block, but the 2nd
one also needs it if it is uncommented.
``---------------------------------------------------------------------------
NameError Traceback (most recent call last)
in ()
----> 1 mnist = learn.datasets.load_dataset('mnist')
2 data = mnist.train.images
3 labels = np.asarray(mnist.train.labels, dtype=np.int32)
4 test_data = mnist.test.images
5 test_labels = np.asarray(mnist.test.labels, dtype=np.int32)
NameError: name 'learn' is not defined``
using Python 2.7 and anaconda.
On a Windows 7 machine with python-3.5.3-amd64 - when running the 00_download_data.ipynb of zurich I end up in the following error within cell no. 2 (when trying to load the "data/frog.npy"):
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-6-64f0c986b1c7> in <module>()
32 url = "https://storage.googleapis.com/quickdraw_dataset/full/numpy_bitmap/{}.npy".format(animal)
33 file_path = maybe_download(url, DATA_DIR)
---> 34 data.append(load_data(file_path, max_examples = 1000, example_name = animal))
35 labels.extend([animal2id[animal]]*data[-1].shape[0])
36
<ipython-input-6-64f0c986b1c7> in load_data(file_path, max_examples, example_name)
20
21 def load_data(file_path, max_examples=2000, example_name=''):
---> 22 d = np.load(open(file_path, 'r'))
23 d = d[:max_examples,:] # limit number of instances to save memory
24 print("Loaded {} {} examples of dimension {} from {}".format(
Cat Dog Estimator appears to be overfitting, and data could be separated between training and test set for better evaluation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.