brew uninstall --ignore-dependencies node icu4c
brew install node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from keras.layers.core import Dense, Activation, Dropout | |
from keras.layers import CuDNNLSTM, LSTM | |
from keras.models import Sequential | |
from keras.models import load_model | |
from keras import optimizers | |
from keras.engine.saving import preprocess_weights_for_loading | |
sample_size = 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install grpcio-tools | |
wget https://github.com/tensorflow/tensorflow/archive/v1.9.0.zip -O tf-190.zip | |
unzip tf-190.zip && rm tf-190.zip | |
wget https://github.com/tensorflow/serving/archive/1.9.0.zip -O tf-serving-190.zip | |
unzip tf-serving-190.zip && rm tf-serving-190.zip | |
mv serving-1.9.0/tensorflow_serving tensorflow-1.9.0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
from keras.applications.inception_v3 import InceptionV3 | |
from keras.optimizers import Adam | |
from keras.utils.io_utils import HDF5Matrix | |
class threadsafe_iter: | |
"""Takes an iterator/generator and makes it thread-safe by | |
serializing call to the `next` method of given iterator/generator. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I just put this in so you can see why it matters | |
class CUDNNCompatible_GRUCell(keras.layers.Layer): | |
"""Cell class for the GRU layer which is compatible with CuDNN GRU cells (but doesn't require tensorflow/Cuda). | |
# Arguments | |
units: Positive integer, dimensionality of the output space. | |
activation: Activation function to use | |
(see [activations](../activations.md)). | |
If you pass None, no activation is applied | |
(ie. "linear" activation: `a(x) = x`). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Train MNIST with tfrecords yielded from a TF Dataset | |
In order to run this example you should first run 'mnist_to_tfrecord.py' | |
which will download MNIST data and serialize it into 3 tfrecords files | |
(train.tfrecords, validation.tfrecords, and test.tfrecords). | |
This example demonstrates the use of TF Datasets wrapped by a generator | |
function. The example currently only works with a fork of keras that accepts | |
`workers=0` as an argument to fit_generator, etc. Passing `workers=0` results | |
in the generator function being run on the main thread (without this various |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Copyright 2017 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This configuration worked for me, hope it helps
It is based on: https://becominghuman.ai/deep-learning-gaming-build-with-nvidia-titan-xp-and-macbook-pro-with-thunderbolt2-5ceee7167f8b
and on: https://stackoverflow.com/questions/44744737/tensorflow-mac-os-gpu-support
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ************************************************************ | |
# Sequel Pro SQL dump | |
# Version 4541 | |
# | |
# http://www.sequelpro.com/ | |
# https://github.com/sequelpro/sequelpro | |
# | |
# Host: 127.0.0.1 (MySQL 5.7.16-0ubuntu0.16.04.1) | |
# Generation Time: 2016-12-21 12:35:15 +0000 | |
# ************************************************************ |