Skip to content

Instantly share code, notes, and snippets.

View deeperunderstanding's full-sized avatar
Tinkering

A Deeper Understanding deeperunderstanding

Tinkering
View GitHub Profile
window_size = train_x.shape[1]
input_dim = train_x.shape[2]
latent_dim = 32
cat_dim = 8
prior_discriminator = create_discriminator(latent_dim)
prior_discriminator.compile(loss='binary_crossentropy',
optimizer=Nadam(0.0002, 0.5),
metrics=['accuracy'])
def create_discriminator(latent_dim):
input_layer = Input(shape=(latent_dim,))
disc = Dense(128)(input_layer)
disc = ELU()(disc)
disc = Dense(64)(disc)
disc = ELU()(disc)
disc = Dense(1, activation="sigmoid")(disc)
model = Model(input_layer, disc)
return model
def create_encoder(latent_dim, cat_dim, window_size, input_dim):
input_layer = Input(shape=(window_size, input_dim))
code = TimeDistributed(Dense(64, activation='linear'))(input_layer)
code = Bidirectional(LSTM(128, return_sequences=True))(code)
code = BatchNormalization()(code)
code = ELU()(code)
code = Bidirectional(LSTM(64))(code)
code = BatchNormalization()(code)
code = ELU()(code)
@deeperunderstanding
deeperunderstanding / docker-compose.yaml
Last active June 18, 2019 14:59
compose file with database added before adding volumes
version: '3'
services:
notebook:
build:
context: ./jupyter-notebook-docker
ports:
- "8888:8888"
depends_on:
- mlflow
environment:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deeperunderstanding
deeperunderstanding / game_of_life.ipynb
Created June 17, 2019 11:41 — forked from jiffyclub/game_of_life.ipynb
Conway's Game of Life in an IPython Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
CREATE DATABASE mlflow;
@deeperunderstanding
deeperunderstanding / Dockerfile
Created June 15, 2019 17:19
Dockerfile for Postgres with init files copied into init folder
FROM postgres:alpine
COPY init.sql /docker-entrypoint-initdb.d/
@deeperunderstanding
deeperunderstanding / Dockerfile
Last active June 18, 2019 15:31
simple Dockerfile for MLflow tracking server with database backend, not waiting for the DB yet
FROM python:3.7.0
RUN pip install mlflow==1.0.0
RUN pip install psycopg2
RUN mkdir /mlflow/
CMD mlflow server \
--backend-store-uri postgresql://admin:secret@postgres:5432/mlflow \
--default-artifact-root /mlflow \
@deeperunderstanding
deeperunderstanding / Dockerfile
Created June 11, 2019 16:26
Dockerfile for Simple MLflow Tracking Server
FROM python:3.7.0
RUN pip install mlflow==1.0.0
RUN mkdir /mlflow/
CMD mlflow server \
--backend-store-uri /mlflow \
--host 0.0.0.0