Created
October 8, 2017 23:45
-
-
Save dcshapiro/a82bdaab79e25982e79aa59b85f31e72 to your computer and use it in GitHub Desktop.
high level idea for a classifier of feature vectors
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 = Sequential() | |
import keras.regularizers as kr | |
w_reg = kr.WeightRegularizer(l1=amountOfL1, l2=amountOfL2) | |
model.add(Dense(width, input_dim=x_train.shape[1], activation='relu', W_regularizer=w_reg)) | |
model.add(Dropout(dropoutAmount)) | |
for i in range(layerCount): | |
model.add(GaussianNoise(noiseLevel)) | |
model.add(Dropout(dropoutAmount)) | |
model.add(Dense(width, activation='relu', W_regularizer=w_reg)) | |
model.add(Dense(y_train.shape[1], activation='relu', W_regularizer=w_reg)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment