Skip to content

Commit

Permalink
Saved weights for trained RNN and LSTM models
Browse files Browse the repository at this point in the history
  • Loading branch information
OrestisAlpos committed May 14, 2017
1 parent d76928e commit 5283cb2
Show file tree
Hide file tree
Showing 27 changed files with 417 additions and 41 deletions.
5 changes: 3 additions & 2 deletions LSTMHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def MyMetrics(y_true, y_pred):
class LSTMHandler:

results_directory = './LSTMresults'
models_directory = './LSTMmodels'
models_directory = './LSTMmodels/'

def __init__(self, model_name, num_categories, loss, optimizer):
# GET THE MODEL
Expand Down Expand Up @@ -88,7 +88,8 @@ def fit_and_eval(self, x_train, y_train, x_test, y_test, nb_epoch, dataset_name)
res_recall.append(recall)
res_fscore.append(fscore)
self.write_result(str(i) +'|'+ str(loss) +'|'+ str(accuracy) +'|'+ str(precision) +'|'+ str(recall) +'|'+ str(fscore))

self.model.save(self.models_directory + 'full_models/' + dataset_name + '.' + self.model_name + '.epoch' + str(i) + '.h5')
self.model.save(self.models_directory + 'full_models/' + dataset_name + '.' + self.model_name + '.h5')
return (res_loss, res_accuracy, res_precision, res_recall, res_fscore)


Expand Down
27 changes: 27 additions & 0 deletions LSTM_2C.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

from keras.models import Sequential
from keras.layers import Dense, Activation, LSTM
from keras.utils.vis_utils import plot_model
import os
import numpy as np
from reader import Reader


length = Reader.getInputShape()

model = Sequential()

#EXPECTS INPUT AS (nb_sample, timesteps, nb_features), where nb_sample=1 (batch_size = 1), timesteps = 1 and nb_features = length

#model.add(Dense(40, input_dim = 12, init='uniform', activation='relu'))
model.add(LSTM(units=50, input_shape=(1,length), batch_input_shape=(1,1,length), recurrent_initializer='random_uniform', kernel_initializer='random_uniform', activation='sigmoid', return_sequences=True, stateful=True))
model.add(LSTM(units=50, recurrent_initializer='random_uniform', kernel_initializer='random_uniform', activation='sigmoid', stateful=True))
model.add(Dense(5, kernel_initializer='random_uniform', activation = 'softmax'))


model.summary()
plot_model(model, to_file='./LSTMmodels/LSTM_2C.png', show_shapes=True)
fp = open('./LSTMmodels/LSTM_2C.json', 'w')
fp.write(model.to_json())
fp.close()

10 changes: 5 additions & 5 deletions LSTM_plot_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#(4, 'Dataset4', 2, 'RNN_1A')
#(5, 'Dataset5', 3, 'RNN_1B')
#(6, 'Dataset0', 5, 'RNN_1C')
dataset_id = 3
dataset_name = 'Dataset3'
num_classes = 2
dataset_id = 0
dataset_name = 'Dataset0'
num_classes = 5
#RNN_name = 'RNN_1A'

num_epochs = 10
Expand All @@ -35,9 +35,9 @@
#x_test = x_test[0:1000,:]
#y_test = y_test[0:1000]

for LSTM_name in ['LSTM_1.2A','LSTM_2.2A', 'LSTM_3.2A']:
for LSTM_name in ['LSTM_2C']:
results = {}
for loss,optimizer in [('binary_crossentropy','rmsprop')]: #categorical_crossentropy
for loss,optimizer in [('mse','sgd')]: #categorical_crossentropy
#for optimizer in ['sgd', 'rmsprop']:
LSTMmodel = LSTMHandler.LSTMHandler(LSTM_name, num_classes, loss, optimizer)
(res_loss, res_accuracy, res_precision, res_recall, res_fscore) = LSTMmodel.fit_and_eval(x_train, y_train, x_test, y_test, num_epochs, dataset_name)
Expand Down
1 change: 1 addition & 0 deletions LSTMmodels/LSTM_2C.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"config": [{"config": {"recurrent_activation": "hard_sigmoid", "recurrent_initializer": {"config": {"seed": null, "maxval": 0.05, "minval": -0.05}, "class_name": "RandomUniform"}, "implementation": 0, "bias_constraint": null, "unit_forget_bias": true, "units": 50, "trainable": true, "activation": "sigmoid", "return_sequences": true, "use_bias": true, "name": "lstm_1", "bias_initializer": {"config": {}, "class_name": "Zeros"}, "recurrent_regularizer": null, "dropout": 0.0, "recurrent_dropout": 0.0, "kernel_regularizer": null, "dtype": "float32", "bias_regularizer": null, "activity_regularizer": null, "unroll": false, "stateful": true, "batch_input_shape": [1, 1, 79], "kernel_initializer": {"config": {"seed": null, "maxval": 0.05, "minval": -0.05}, "class_name": "RandomUniform"}, "kernel_constraint": null, "recurrent_constraint": null, "go_backwards": false}, "class_name": "LSTM"}, {"config": {"recurrent_activation": "hard_sigmoid", "recurrent_initializer": {"config": {"seed": null, "maxval": 0.05, "minval": -0.05}, "class_name": "RandomUniform"}, "implementation": 0, "bias_constraint": null, "unit_forget_bias": true, "units": 50, "trainable": true, "activation": "sigmoid", "return_sequences": false, "dropout": 0.0, "name": "lstm_2", "bias_initializer": {"config": {}, "class_name": "Zeros"}, "recurrent_regularizer": null, "use_bias": true, "recurrent_dropout": 0.0, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "unroll": false, "stateful": true, "kernel_initializer": {"config": {"seed": null, "maxval": 0.05, "minval": -0.05}, "class_name": "RandomUniform"}, "kernel_constraint": null, "recurrent_constraint": null, "go_backwards": false}, "class_name": "LSTM"}, {"config": {"trainable": true, "use_bias": true, "bias_constraint": null, "units": 5, "activation": "softmax", "bias_regularizer": null, "activity_regularizer": null, "name": "dense_1", "kernel_regularizer": null, "kernel_initializer": {"config": {"seed": null, "maxval": 0.05, "minval": -0.05}, "class_name": "RandomUniform"}, "kernel_constraint": null, "bias_initializer": {"config": {}, "class_name": "Zeros"}}, "class_name": "Dense"}], "backend": "theano", "class_name": "Sequential", "keras_version": "2.0.3"}
Binary file added LSTMmodels/LSTM_2C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions LSTMmodels/full_models/Dataset0.LSTM_2C/Dataset0.LSTM_2C
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|0.14650396882|0.581|0|0|0
2|0.134933630332|0.581|0|0|0
3|0.12807858073|0.581|0|0|0
4|0.125045746896|0.581|0|0|0
5|0.123950693227|0.581|0|0|0
6|0.123648752145|0.581|0|0|0
7|0.123634647191|0.581|0|0|0
8|0.123708837941|0.581|0|0|0
9|0.123797330961|0.581|0|0|0
10|0.123875424441|0.581|0|0|0
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|0.146884530544|0.579|0|0|0
2|0.135687147945|0.579|0|0|0
3|0.128945879199|0.579|0|0|0
4|0.125824560031|0.579|0|0|0
5|0.124595511615|0.579|0|0|0
6|0.124180880323|0.579|0|0|0
7|0.124085704312|0.579|0|0|0
8|0.12410484181|0.579|0|0|0
9|0.124156942427|0.579|0|0|0
10|0.124211117879|0.579|0|0|0
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|0.150555812597|0.55|0|0|0
2|0.142311920874|0.55|0|0|0
3|0.136620218471|0.55|0|0|0
4|0.133332525082|0.55|0|0|0
5|0.131608594321|0.55|0|0|0
6|0.130735595852|0.55|0|0|0
7|0.130294553764|0.55|0|0|0
8|0.130069818463|0.55|0|0|0
9|0.129955085322|0.55|0|0|0
10|0.129897934154|0.55|0|0|0
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|nan|0.548665297741|0|0|0
2|nan|0.548665297741|0|0|0
3|nan|0.548665297741|0|0|0
4|nan|0.548665297741|0|0|0
5|nan|0.548665297741|0|0|0
6|nan|0.548665297741|0|0|0
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|0.132268971939|0.536852063103|0|0|0
2|0.127221430943|0.536852063103|0|0|0
3|0.0402869192958|0.90296597201|0|0|0
4|0.013252615212|0.971286274728|0|0|0
5|0.00871043029935|0.978256030717|0|0|0
6|0.00715632640869|0.9796193762|0|0|0
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|0.131039403329|0.544940222032|0|0|0
2|0.0857365173791|0.654608774552|0|0|0
3|0.0308658724279|0.924130017079|0|0|0
4|0.0121295026073|0.97045794193|0|0|0
5|0.00885947539087|0.976542485056|0|0|0
6|0.00754022111713|0.978730785653|0|0|0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
60 changes: 60 additions & 0 deletions LSTMresults/Dataset0.LSTM_2C
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|0.14650396882|0.581|0|0|0
2|0.134933630332|0.581|0|0|0
3|0.12807858073|0.581|0|0|0
4|0.125045746896|0.581|0|0|0
5|0.123950693227|0.581|0|0|0
6|0.123648752145|0.581|0|0|0
7|0.123634647191|0.581|0|0|0
8|0.123708837941|0.581|0|0|0
9|0.123797330961|0.581|0|0|0
10|0.123875424441|0.581|0|0|0
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|0.146884530544|0.579|0|0|0
2|0.135687147945|0.579|0|0|0
3|0.128945879199|0.579|0|0|0
4|0.125824560031|0.579|0|0|0
5|0.124595511615|0.579|0|0|0
6|0.124180880323|0.579|0|0|0
7|0.124085704312|0.579|0|0|0
8|0.12410484181|0.579|0|0|0
9|0.124156942427|0.579|0|0|0
10|0.124211117879|0.579|0|0|0
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|0.150555812597|0.55|0|0|0
2|0.142311920874|0.55|0|0|0
3|0.136620218471|0.55|0|0|0
4|0.133332525082|0.55|0|0|0
5|0.131608594321|0.55|0|0|0
6|0.130735595852|0.55|0|0|0
7|0.130294553764|0.55|0|0|0
8|0.130069818463|0.55|0|0|0
9|0.129955085322|0.55|0|0|0
10|0.129897934154|0.55|0|0|0
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|nan|0.548665297741|0|0|0
2|nan|0.548665297741|0|0|0
3|nan|0.548665297741|0|0|0
4|nan|0.548665297741|0|0|0
5|nan|0.548665297741|0|0|0
6|nan|0.548665297741|0|0|0
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|0.132268971939|0.536852063103|0|0|0
2|0.127221430943|0.536852063103|0|0|0
3|0.0402869192958|0.90296597201|0|0|0
4|0.013252615212|0.971286274728|0|0|0
5|0.00871043029935|0.978256030717|0|0|0
6|0.00715632640869|0.9796193762|0|0|0
LSTM_2C Dataset0 Loss:mse Optimizer:sgd Dropout:No
Epoch|Loss|Accuracy|Precision|Recall|Fscore
1|0.131039403329|0.544940222032|0|0|0
2|0.0857365173791|0.654608774552|0|0|0
3|0.0308658724279|0.924130017079|0|0|0
4|0.0121295026073|0.97045794193|0|0|0
5|0.00885947539087|0.976542485056|0|0|0
6|0.00754022111713|0.978730785653|0|0|0
5 changes: 3 additions & 2 deletions RNNHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class RNNHandler:
results_directory = './RNNresults'
models_directory = './RNNmodels'

def __init__(self, model_name, num_categories, loss, optimizer):
def __init__(self, model_name, num_categories, loss, optimizer, optimizer_name):
# GET THE MODEL
fp_model = open(os.path.join(self.models_directory, model_name + '.json'), 'r')
model_str = fp_model.read()
Expand All @@ -56,11 +56,12 @@ def __init__(self, model_name, num_categories, loss, optimizer):
self.num_categories = num_categories
self.loss = loss
self.optimizer = optimizer
self.optimizer_name = optimizer_name


def fit_and_eval(self, x_train, y_train, x_test, y_test, nb_epoch, dataset_name): #batch_size is always 1 and shuffle is always False, so we don't pass them as parameters
self.results_file = os.path.join(self.results_directory, dataset_name + '.' + self.model_name)
self.write_result(self.model_name + ' ' + dataset_name + ' Loss:' + self.loss + ' Optimizer:' + self.optimizer + ' Dropout:No')
self.write_result(self.model_name + ' ' + dataset_name + ' Loss:' + self.loss + ' Optimizer:' + self.optimizer_name + ' Dropout:No')
self.write_result('Epoch|Loss|Accuracy|Precision|Recall|Fscore')
res_loss = []
res_accuracy = []
Expand Down
27 changes: 27 additions & 0 deletions RNN_2.2C.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

from keras.models import Sequential
from keras.layers import Dense, Activation, SimpleRNN
from keras.utils.vis_utils import plot_model
import os
import numpy as np
from reader import Reader


length = Reader.getInputShape()

model = Sequential()

#EXPECTS INPUT AS (nb_sample, timesteps, nb_features), where nb_sample=1 (batch_size = 1), timesteps = 1 and nb_features = length

#model.add(Dense(40, input_dim = 12, init='uniform', activation='relu'))
model.add(SimpleRNN(units=50, input_shape=(1,length), batch_input_shape=(1,1,length), recurrent_initializer='random_uniform', kernel_initializer='random_uniform', activation='sigmoid', return_sequences=True, stateful=True))
model.add(SimpleRNN(units=50, recurrent_initializer='random_uniform', kernel_initializer='random_uniform', activation='sigmoid', stateful=True))
model.add(Dense(5, kernel_initializer='random_uniform', activation = 'softmax'))


model.summary()
plot_model(model, to_file='./RNNmodels/RNN_2.2C.png', show_shapes=True)
fp = open('./RNNmodels/RNN_2.2C.json', 'w')
fp.write(model.to_json())
fp.close()

21 changes: 13 additions & 8 deletions RNN_plot_all.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import keras.utils
from keras import optimizers
from keras.models import Sequential, model_from_json, load_model
from keras.layers import Dense, Activation, SimpleRNN
from keras.utils.vis_utils import plot_model
Expand Down Expand Up @@ -27,7 +28,7 @@
num_classes = 5
#RNN_name = 'RNN_1A'

num_epochs = 20
num_epochs = 10

(x_train, y_train), (x_test, y_test) = Reader.getDataset(dataset_id)
#x_train = x_train[0:1000,:]
Expand All @@ -37,14 +38,18 @@

for RNN_name in ['RNN_2C']:
results = {}
for loss,optimizer in [('mse','sgd')]:#, ('categorical_crossentropy','rmsprop')]: #categorical_crossentropy
#for loss,optimizer in [('mse','sgd')]:#, ('categorical_crossentropy','rmsprop')]: #categorical_crossentropy
#for optimizer in ['sgd', 'rmsprop']:
RNNmodel = RNNHandler.RNNHandler(RNN_name, num_classes, loss, optimizer)
(res_loss, res_accuracy, res_precision, res_recall, res_fscore) = RNNmodel.fit_and_eval(x_train, y_train, x_test, y_test, num_epochs, dataset_name)
if num_classes == 2:
results[loss + '|' + optimizer] = res_fscore
else:
results[loss + '|' + optimizer] = res_accuracy
loss = 'mse'
optimizer = 'sgd'
#optimizer_w_params = optimizers.RMSprop(lr=0.00007)
optimizer_w_params = 'sgd'
RNNmodel = RNNHandler.RNNHandler(RNN_name, num_classes, loss, optimizer_w_params, optimizer)
(res_loss, res_accuracy, res_precision, res_recall, res_fscore) = RNNmodel.fit_and_eval(x_train, y_train, x_test, y_test, num_epochs, dataset_name)
if num_classes == 2:
results[loss + '|' + optimizer] = res_fscore
else:
results[loss + '|' + optimizer] = res_accuracy

title = dataset_name + '.' + RNN_name
metric = 'accuracy'
Expand Down
1 change: 1 addition & 0 deletions RNNmodels/RNN_2.2C.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"config": [{"config": {"kernel_regularizer": null, "units": 50, "bias_regularizer": null, "batch_input_shape": [1, 1, 79], "bias_constraint": null, "recurrent_regularizer": null, "stateful": true, "dtype": "float32", "recurrent_dropout": 0.0, "implementation": 0, "recurrent_constraint": null, "use_bias": true, "kernel_initializer": {"config": {"minval": -0.05, "maxval": 0.05, "seed": null}, "class_name": "RandomUniform"}, "return_sequences": true, "activity_regularizer": null, "name": "simple_rnn_1", "unroll": false, "activation": "sigmoid", "trainable": true, "go_backwards": false, "kernel_constraint": null, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "dropout": 0.0, "recurrent_initializer": {"config": {"minval": -0.05, "maxval": 0.05, "seed": null}, "class_name": "RandomUniform"}}, "class_name": "SimpleRNN"}, {"config": {"kernel_regularizer": null, "units": 50, "bias_regularizer": null, "bias_constraint": null, "recurrent_regularizer": null, "stateful": true, "recurrent_dropout": 0.0, "implementation": 0, "recurrent_constraint": null, "use_bias": true, "kernel_initializer": {"config": {"minval": -0.05, "maxval": 0.05, "seed": null}, "class_name": "RandomUniform"}, "return_sequences": false, "activity_regularizer": null, "name": "simple_rnn_2", "unroll": false, "activation": "sigmoid", "trainable": true, "go_backwards": false, "kernel_constraint": null, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "dropout": 0.0, "recurrent_initializer": {"config": {"minval": -0.05, "maxval": 0.05, "seed": null}, "class_name": "RandomUniform"}}, "class_name": "SimpleRNN"}, {"config": {"kernel_regularizer": null, "units": 5, "bias_regularizer": null, "bias_constraint": null, "name": "dense_1", "activity_regularizer": null, "activation": "softmax", "trainable": true, "kernel_constraint": null, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "use_bias": true, "kernel_initializer": {"config": {"minval": -0.05, "maxval": 0.05, "seed": null}, "class_name": "RandomUniform"}}, "class_name": "Dense"}], "class_name": "Sequential", "keras_version": "2.0.3", "backend": "theano"}
Binary file added RNNmodels/RNN_2.2C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion RNNmodels/RNN_2C.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"keras_version": "2.0.3", "config": [{"config": {"stateful": true, "trainable": true, "bias_regularizer": null, "recurrent_regularizer": null, "return_sequences": true, "use_bias": true, "name": "simple_rnn_1", "activity_regularizer": null, "unroll": false, "dtype": "float32", "activation": "relu", "batch_input_shape": [1, 1, 79], "units": 50, "bias_constraint": null, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "kernel_regularizer": null, "recurrent_initializer": {"config": {"maxval": 0.05, "minval": -0.05, "seed": null}, "class_name": "RandomUniform"}, "go_backwards": false, "recurrent_constraint": null, "recurrent_dropout": 0.0, "implementation": 0, "dropout": 0.0, "kernel_initializer": {"config": {"maxval": 0.05, "minval": -0.05, "seed": null}, "class_name": "RandomUniform"}, "kernel_constraint": null}, "class_name": "SimpleRNN"}, {"config": {"stateful": true, "trainable": true, "bias_regularizer": null, "recurrent_regularizer": null, "return_sequences": false, "use_bias": true, "name": "simple_rnn_2", "activity_regularizer": null, "unroll": false, "activation": "relu", "units": 50, "bias_constraint": null, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "kernel_regularizer": null, "recurrent_initializer": {"config": {"maxval": 0.05, "minval": -0.05, "seed": null}, "class_name": "RandomUniform"}, "go_backwards": false, "recurrent_constraint": null, "recurrent_dropout": 0.0, "implementation": 0, "dropout": 0.0, "kernel_initializer": {"config": {"maxval": 0.05, "minval": -0.05, "seed": null}, "class_name": "RandomUniform"}, "kernel_constraint": null}, "class_name": "SimpleRNN"}, {"config": {"bias_constraint": null, "name": "dense_1", "trainable": true, "bias_regularizer": null, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "use_bias": true, "units": 5, "activity_regularizer": null, "kernel_regularizer": null, "kernel_initializer": {"config": {"maxval": 0.05, "minval": -0.05, "seed": null}, "class_name": "RandomUniform"}, "activation": "softmax", "kernel_constraint": null}, "class_name": "Dense"}], "backend": "theano", "class_name": "Sequential"}
{"keras_version": "2.0.3", "config": [{"config": {"return_sequences": true, "use_bias": true, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "units": 50, "dropout": 0.0, "batch_input_shape": [1, 1, 79], "bias_initializer": {"config": {}, "class_name": "Zeros"}, "kernel_regularizer": null, "unroll": false, "recurrent_constraint": null, "name": "simple_rnn_1", "kernel_initializer": {"config": {"minval": -0.05, "maxval": 0.05, "seed": null}, "class_name": "RandomUniform"}, "implementation": 0, "recurrent_dropout": 0.0, "activation": "relu", "dtype": "float32", "stateful": true, "recurrent_regularizer": null, "bias_constraint": null, "trainable": true, "go_backwards": false, "recurrent_initializer": {"config": {"minval": -0.05, "maxval": 0.05, "seed": null}, "class_name": "RandomUniform"}}, "class_name": "SimpleRNN"}, {"config": {"return_sequences": false, "use_bias": true, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "units": 50, "dropout": 0.0, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "kernel_regularizer": null, "unroll": false, "recurrent_constraint": null, "name": "simple_rnn_2", "kernel_initializer": {"config": {"minval": -0.05, "maxval": 0.05, "seed": null}, "class_name": "RandomUniform"}, "implementation": 0, "recurrent_dropout": 0.0, "activation": "relu", "stateful": true, "recurrent_regularizer": null, "bias_constraint": null, "trainable": true, "go_backwards": false, "recurrent_initializer": {"config": {"minval": -0.05, "maxval": 0.05, "seed": null}, "class_name": "RandomUniform"}}, "class_name": "SimpleRNN"}, {"config": {"activity_regularizer": null, "use_bias": true, "bias_regularizer": null, "kernel_constraint": null, "units": 5, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "kernel_regularizer": null, "bias_constraint": null, "trainable": true, "name": "dense_1", "kernel_initializer": {"config": {"minval": -0.05, "maxval": 0.05, "seed": null}, "class_name": "RandomUniform"}, "activation": "softmax"}, "class_name": "Dense"}], "backend": "theano", "class_name": "Sequential"}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading

0 comments on commit 5283cb2

Please sign in to comment.