Skip to content

Instantly share code, notes, and snippets.

@grantwwoodford
grantwwoodford / leak.py
Created June 1, 2018 17:29
uncertainty_leak_issue
from keras.layers import Dense, Dropout
from keras.models import Sequential
import numpy as np
import keras.backend as K
def model():
# create model
model = Sequential()
model.add(Dense(100, input_dim=36, kernel_initializer='uniform', activation='relu'))
@grantwwoodford
grantwwoodford / leak.py
Created June 1, 2018 17:29
uncertainty_leak_issue
from keras.layers import Dense, Dropout
from keras.models import Sequential
import numpy as np
import keras.backend as K
def model():
# create model
model = Sequential()
model.add(Dense(100, input_dim=36, kernel_initializer='uniform', activation='relu'))
# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
import threading as t
import tensorflow as tf
# create model
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
import threading as t
import tensorflow as tf
graph = tf.get_default_graph()
def t_thread():
# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
import threading as t
import tensorflow as tf
def t_thread():
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
import threading as t
import tensorflow as tf
graph = tf.get_default_graph()
def t_thread():
# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
import thread
def t_thread():
# create model
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
@grantwwoodford
grantwwoodford / RomanNumerals.fs
Created February 16, 2016 20:26
Convert integers to Roman Numerals
let rec repeat x (s : string) : string =
match x with
| 0 -> ""
| x -> s + (repeat (x-1) s)
let roman_numeral_ordering n (one : string) (five : string) (ten : string) =
match n with
| 0 -> ""
| n when n < 4 -> repeat n one
| n when n = 4 -> one + five