Skip to content

Instantly share code, notes, and snippets.

View bnaul's full-sized avatar

Brett Naul bnaul

View GitHub Profile
import numpy as np
from bokeh.layouts import row
from bokeh.models.widgets import CheckboxGroup
from bokeh.plotting import figure, show
from bokeh.core.json_encoder import serialize_json
from bokeh.document import Document
from bokeh.util.serialization import make_id
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from concurrent.futures import ThreadPoolExecutor
import keras
def f():
# NOTE: removing this line causes the `get_weights` call later to fail
# The initialization performed in `get_session` is important somehow?
print('Info:', keras.backend.get_session(), keras.backend.get_session().graph)
model = keras.models.Sequential()
import tensorflow as tf
from tensorflow.contrib import keras
from tensorflow.examples.tutorials.mnist import input_data
from dask.multiprocessing import get as mp_get
from distributed import Client
from functools import partial
from sklearn.model_selection import ParameterGrid
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import tensorflow as tf
import keras
from keras import backend as K
from distributed import Client, client
def new_session():
sess = tf.Session()
return sess
from argparse import Namespace
from multiprocessing import Pool, current_process
import sys
import tempfile
from sklearn.model_selection import ParameterGrid
from keras_util import parse_model_args, limited_memory_session
from autoencoder import main as autoencoder
from period import main as period
from asas import main as asas
from asas_full import main as asas_full
from argparse import Namespace
from multiprocessing import Pool, current_process
import sys
import tempfile
from sklearn.model_selection import ParameterGrid
from keras_util import parse_model_args, limited_memory_session
from autoencoder import main as autoencoder
from period import main as period
from asas import main as asas
from asas_full import main as asas_full
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.