This file contains 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
from keras.layers import LSTM | |
model = Sequential() | |
model.add(Embedding(max_features, 256, input_length=maxlen)) | |
model.add(LSTM(output_dim=128, activation='sigmoid', inner_activation='hard_sigmoid')) | |
model.add(Dropout(0.5)) model.add(Dense(1)) | |
model.add(Activation('sigmoid')) | |
model.compile(loss='binary_crossentropy', optimizer='rmsprop', metrics=['accuracy']) | |
model.fit(X_train, Y_train, batch_size=16, nb_epoch=10) |
This file contains 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
Model: "mobilenetv2_1.00_224" | |
__________________________________________________________________________________________________ | |
Layer (type) Output Shape Param # Connected to | |
================================================================================================== | |
input_1 (InputLayer) [(None, 224, 224, 3) 0 | |
__________________________________________________________________________________________________ | |
Conv1_pad (ZeroPadding2D) (None, 225, 225, 3) 0 input_1[0][0] | |
__________________________________________________________________________________________________ | |
Conv1 (Conv2D) (None, 112, 112, 32) 864 Conv1_pad[0][0] | |
__________________________________________________________________________________________________ |
This file has been truncated, but you can view the full file.
This file contains 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
WORKSPACE: /Users/ljohnson/repos/tensorflow | |
CI_DOCKER_BUILD_EXTRA_PARAMS: | |
CI_DOCKER_EXTRA_PARAMS: -e CI_BUILD_PYTHON=python3 -e CROSSTOOL_PYTHON_INCLUDE_PATH=/usr/include/python3.4 | |
COMMAND: tensorflow/tools/ci_build/pi/build_raspberry_pi.sh | |
CI_COMMAND_PREFIX: ./tensorflow/tools/ci_build/builds/with_the_same_user ./tensorflow/tools/ci_build/builds/configured pi-python3 | |
CONTAINER_TYPE: pi-python3 | |
BUILD_TAG: tf_ci | |
(docker container name will be tf_ci.pi-python3) | |
This file contains 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
CI_DOCKER_EXTRA_PARAMS="-e CI_BUILD_PYTHON=python3 -e CROSSTOOL_PYTHON_INCLUDE_PATH=/usr/include/python3.5" \ | |
tensorflow/tools/ci_build/ci_build.sh PI-PYTHON3 \ | |
tensorflow/tools/ci_build/pi/build_raspberry_pi.sh | |
CC_TOOL=/tools/cross-pi-gcc-8.3.0-1/bin/arm-linux-gnueabihf-g++ \ | |
bazel build -c opt \ | |
--copt=-march=armv7-a \ | |
--copt=-mfpu=neon-vfpv4 \ | |
--copt=-std=c++11 \ | |
--copt=-funsafe-math-optimizations --copt=-ftree-vectorize \ |
This file contains 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
echo "Downloading and installing go" | |
wget https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz /home/multipass/go1.11.2.linux-amd64.tar.gz | |
tar -xvf go1.11.2.linux-amd64.tar.gz |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
def nth_iterinterleave(*arrays, nth=1): | |
"""Interleave multiple lists. | |
via https://github.com/dgilland/pydash/blob/develop/src/pydash/arrays.py | |
Expanded to allow an nth parameter, where arrays[0] is treated as the primary and arrays[1:] are interleaved every n elements | |
Example: | |
given *arrays = [ [1,2,3,4,5,6,7,8,9,10], ['x', 'y', 'z'], ['a', 'b', 'c'] ] |
This file contains 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
<link href="/assets/threejs-cloth/styles/styles.css" rel="stylesheet"> | |
<div class='container'> | |
<div class='row'> | |
</div> | |
<h1> A quick demonstration - <small>writeup soon!</small></h1> | |
<div class='row'> | |
<h1 class='col-md-6'> Choose a pattern:</h1> | |
</div> | |
<div class='row controls'> |
This file contains 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
from dateutil import rrule | |
import datetime | |
# Generate ruleset for holiday observances on the NYSE | |
def NYSE_holidays(a=datetime.date.today(), b=datetime.date.today()+datetime.timedelta(days=365)): | |
rs = rrule.rruleset() | |
# Include all potential holiday observances | |
rs.rrule(rrule.rrule(rrule.YEARLY, dtstart=a, until=b, bymonth=12, bymonthday=31, byweekday=rrule.FR)) # New Years Day |