Skip to content

Instantly share code, notes, and snippets.

View deeperunderstanding's full-sized avatar
Tinkering

A Deeper Understanding deeperunderstanding

Tinkering
View GitHub Profile
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
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'])
batches = 10000
batch_size=64
losses_disc = []
losses_disc_cat = []
losses_ae = []
losses_val = []
real = np.ones((batch_size, 1))
fake = np.zeros((batch_size, 1))
@deeperunderstanding
deeperunderstanding / Dockerfile
Last active June 19, 2019 12:55
Jupyter Notebook Dockerfile
FROM jupyter/scipy-notebook
RUN conda install --quiet --yes \
'mlflow=1.0.0' \
'psycopg2'
@deeperunderstanding
deeperunderstanding / docker-compose.yml
Last active June 18, 2019 18:26
The final docker-compose file
version: '3'
services:
notebook:
build:
context: ./jupyter-notebook-docker
ports:
- "8888:8888"
depends_on:
- mlflow
environment:
@deeperunderstanding
deeperunderstanding / docker-compose.yml
Last active June 18, 2019 17:55
The docker-compose now with mlflow tracking server added
version: '3'
services:
notebook:
build:
context: ./jupyter-notebook-docker
ports:
- "8888:8888"
depends_on:
- mlflow
environment:
@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
Last active June 18, 2019 15:30
Final Dockerfile for MLFlow
FROM python:3.7.0
RUN pip install mlflow==1.0.0
RUN pip install psycopg2
EXPOSE 5000
RUN mkdir -p /server
WORKDIR /server
COPY . /server
@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.