Skip to content

Instantly share code, notes, and snippets.

View YatinAdityaT's full-sized avatar
🙃
Learning...

Sabito YatinAdityaT

🙃
Learning...
View GitHub Profile
@YatinAdityaT
YatinAdityaT / tensorflow_serving
Created April 29, 2020 02:00
Getting “bash: syntax error near unexpected token `|'” when trying to install tensorflow serving
echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" | sudo tee /etc/apt/sources.list.d/tensorflow-serving.list && \
curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | sudo apt-key add -
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~\.conda\envs\gpu2\lib\site-packages\tensorflow_core\python\eager\context.py in __enter__(self)
1508 try:
-> 1509 new_device_name, new_device_spec = _device_parsing_cache[cache_key]
1510 except TypeError:
KeyError: ('', '/job:localhost/replica:0/task:0/device:GPU:0')
During handling of the above exception, another exception occurred:
@YatinAdityaT
YatinAdityaT / draw_neural_net.py
Created July 30, 2019 14:08 — forked from craffel/draw_neural_net.py
Draw a neural network diagram with matplotlib!
import matplotlib.pyplot as plt
def draw_neural_net(ax, left, right, bottom, top, layer_sizes):
'''
Draw a neural network cartoon using matplotilb.
:usage:
>>> fig = plt.figure(figsize=(12, 12))
>>> draw_neural_net(fig.gca(), .1, .9, .1, .9, [4, 7, 2])