-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
OrestisAlpos
committed
Apr 27, 2017
1 parent
32f5c42
commit fbc427c
Showing
17 changed files
with
124 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
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', stateful=True)) | ||
model.add(Dense(1, kernel_initializer='random_uniform', activation = 'sigmoid')) | ||
|
||
|
||
model.summary() | ||
plot_model(model, to_file='./RNNmodels/RNN_1.2A.png', show_shapes=True) | ||
fp = open('./RNNmodels/RNN_1.2A.json', 'w') | ||
fp.write(model.to_json()) | ||
fp.close() | ||
|
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
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(1, kernel_initializer='random_uniform', activation = 'sigmoid')) | ||
|
||
|
||
model.summary() | ||
plot_model(model, to_file='./RNNmodels/RNN_2.2A.png', show_shapes=True) | ||
fp = open('./RNNmodels/RNN_2.2A.json', 'w') | ||
fp.write(model.to_json()) | ||
fp.close() | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
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=40, recurrent_initializer='random_uniform', kernel_initializer='random_uniform', activation='sigmoid', stateful=True, return_sequences=True)) | ||
model.add(SimpleRNN(units=30, recurrent_initializer='random_uniform', kernel_initializer='random_uniform', activation='sigmoid', stateful=True)) | ||
model.add(Dense(1, kernel_initializer='random_uniform', activation = 'sigmoid')) | ||
|
||
|
||
model.summary() | ||
plot_model(model, to_file='./RNNmodels/RNN_3.2A.png', show_shapes=True) | ||
fp = open('./RNNmodels/RNN_3.2A.json', 'w') | ||
fp.write(model.to_json()) | ||
fp.close() | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"backend": "theano", "config": [{"class_name": "SimpleRNN", "config": {"dropout": 0.0, "use_bias": true, "activation": "sigmoid", "recurrent_regularizer": null, "dtype": "float32", "batch_input_shape": [1, 1, 79], "stateful": true, "recurrent_initializer": {"class_name": "RandomUniform", "config": {"maxval": 0.05, "minval": -0.05, "seed": null}}, "bias_regularizer": null, "units": 50, "activity_regularizer": null, "recurrent_constraint": null, "kernel_initializer": {"class_name": "RandomUniform", "config": {"maxval": 0.05, "minval": -0.05, "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "recurrent_dropout": 0.0, "unroll": false, "kernel_regularizer": null, "kernel_constraint": null, "return_sequences": false, "implementation": 0, "trainable": true, "name": "simple_rnn_1", "go_backwards": false, "bias_constraint": null}}, {"class_name": "Dense", "config": {"use_bias": true, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "activation": "sigmoid", "kernel_constraint": null, "kernel_initializer": {"class_name": "RandomUniform", "config": {"maxval": 0.05, "minval": -0.05, "seed": null}}, "units": 1, "activity_regularizer": null, "trainable": true, "name": "dense_1", "bias_regularizer": null, "bias_constraint": null}}], "keras_version": "2.0.3", "class_name": "Sequential"} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"class_name": "Sequential", "config": [{"class_name": "SimpleRNN", "config": {"bias_initializer": {"class_name": "Zeros", "config": {}}, "dtype": "float32", "dropout": 0.0, "implementation": 0, "batch_input_shape": [1, 1, 79], "kernel_initializer": {"class_name": "RandomUniform", "config": {"seed": null, "minval": -0.05, "maxval": 0.05}}, "trainable": true, "activation": "sigmoid", "bias_regularizer": null, "units": 50, "unroll": false, "stateful": true, "kernel_regularizer": null, "name": "simple_rnn_1", "bias_constraint": null, "kernel_constraint": null, "recurrent_dropout": 0.0, "recurrent_initializer": {"class_name": "RandomUniform", "config": {"seed": null, "minval": -0.05, "maxval": 0.05}}, "go_backwards": false, "return_sequences": true, "recurrent_constraint": null, "use_bias": true, "activity_regularizer": null, "recurrent_regularizer": null}}, {"class_name": "SimpleRNN", "config": {"bias_initializer": {"class_name": "Zeros", "config": {}}, "dropout": 0.0, "implementation": 0, "kernel_initializer": {"class_name": "RandomUniform", "config": {"seed": null, "minval": -0.05, "maxval": 0.05}}, "use_bias": true, "trainable": true, "activation": "sigmoid", "bias_regularizer": null, "units": 50, "unroll": false, "stateful": true, "kernel_regularizer": null, "name": "simple_rnn_2", "bias_constraint": null, "kernel_constraint": null, "recurrent_initializer": {"class_name": "RandomUniform", "config": {"seed": null, "minval": -0.05, "maxval": 0.05}}, "go_backwards": false, "return_sequences": false, "recurrent_constraint": null, "recurrent_regularizer": null, "activity_regularizer": null, "recurrent_dropout": 0.0}}, {"class_name": "Dense", "config": {"kernel_regularizer": null, "name": "dense_1", "bias_constraint": null, "kernel_initializer": {"class_name": "RandomUniform", "config": {"seed": null, "minval": -0.05, "maxval": 0.05}}, "kernel_constraint": null, "bias_initializer": {"class_name": "Zeros", "config": {}}, "trainable": true, "activation": "sigmoid", "bias_regularizer": null, "use_bias": true, "units": 1, "activity_regularizer": null}}], "backend": "theano", "keras_version": "2.0.3"} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"config": [{"config": {"stateful": true, "units": 50, "trainable": true, "bias_regularizer": null, "implementation": 0, "kernel_regularizer": null, "kernel_constraint": null, "go_backwards": false, "batch_input_shape": [1, 1, 79], "dropout": 0.0, "recurrent_constraint": null, "activity_regularizer": null, "use_bias": true, "unroll": false, "bias_constraint": null, "kernel_initializer": {"config": {"minval": -0.05, "seed": null, "maxval": 0.05}, "class_name": "RandomUniform"}, "activation": "sigmoid", "bias_initializer": {"config": {}, "class_name": "Zeros"}, "recurrent_regularizer": null, "return_sequences": true, "recurrent_dropout": 0.0, "name": "simple_rnn_1", "recurrent_initializer": {"config": {"minval": -0.05, "seed": null, "maxval": 0.05}, "class_name": "RandomUniform"}, "dtype": "float32"}, "class_name": "SimpleRNN"}, {"config": {"stateful": true, "units": 40, "trainable": true, "bias_regularizer": null, "implementation": 0, "go_backwards": false, "kernel_constraint": null, "kernel_regularizer": null, "name": "simple_rnn_2", "recurrent_constraint": null, "activity_regularizer": null, "use_bias": true, "unroll": false, "bias_constraint": null, "kernel_initializer": {"config": {"minval": -0.05, "seed": null, "maxval": 0.05}, "class_name": "RandomUniform"}, "activation": "sigmoid", "recurrent_dropout": 0.0, "recurrent_regularizer": null, "return_sequences": true, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "dropout": 0.0, "recurrent_initializer": {"config": {"minval": -0.05, "seed": null, "maxval": 0.05}, "class_name": "RandomUniform"}}, "class_name": "SimpleRNN"}, {"config": {"stateful": true, "units": 30, "trainable": true, "bias_regularizer": null, "implementation": 0, "go_backwards": false, "kernel_constraint": null, "kernel_regularizer": null, "name": "simple_rnn_3", "recurrent_constraint": null, "activity_regularizer": null, "use_bias": true, "unroll": false, "bias_constraint": null, "kernel_initializer": {"config": {"minval": -0.05, "seed": null, "maxval": 0.05}, "class_name": "RandomUniform"}, "activation": "sigmoid", "recurrent_dropout": 0.0, "recurrent_regularizer": null, "return_sequences": false, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "dropout": 0.0, "recurrent_initializer": {"config": {"minval": -0.05, "seed": null, "maxval": 0.05}, "class_name": "RandomUniform"}}, "class_name": "SimpleRNN"}, {"config": {"units": 1, "activity_regularizer": null, "trainable": true, "use_bias": true, "bias_regularizer": null, "kernel_initializer": {"config": {"minval": -0.05, "seed": null, "maxval": 0.05}, "class_name": "RandomUniform"}, "activation": "sigmoid", "kernel_regularizer": null, "kernel_constraint": null, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "name": "dense_1", "bias_constraint": null}, "class_name": "Dense"}], "keras_version": "2.0.3", "backend": "theano", "class_name": "Sequential"} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
RNN_2.2A Dataset3 Loss:binary_crossentropy Optimizer:rmsprop Dropout:No | ||
Epoch|Loss|Accuracy|Precision|Recall|Fscore | ||
1|4.11098907206|0.744833333333|0.986037586024|0.4967|0.660622450789 | ||
2|4.11092153752|0.744905555556|0.986148790225|0.496788888889|0.660726028713 | ||
3|4.11085149486|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
4|4.11084888653|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
5|4.11084704866|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
6|4.11084670704|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
7|4.11084650289|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
8|4.11084656372|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
9|4.11084650949|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
10|4.11084649933|0.744916666667|0.98619229327|0.496788888889|0.660735792873 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
RNN_3.2A Dataset3 Loss:binary_crossentropy Optimizer:rmsprop Dropout:No | ||
Epoch|Loss|Accuracy|Precision|Recall|Fscore | ||
1|4.11160773746|0.744738888889|0.985496704798|0.496788888889|0.660579600943 | ||
2|4.11085833815|0.744911111111|0.986170541268|0.496788888889|0.660730910757 | ||
3|4.11084675434|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
4|4.11084652899|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
5|4.11084649866|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
6|4.11084649783|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
7|4.1108464988|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
8|4.11084649771|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
9|4.11084649771|0.744916666667|0.98619229327|0.496788888889|0.660735792873 | ||
10|4.11084649771|0.744916666667|0.98619229327|0.496788888889|0.660735792873 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
RNN_1.2A Dataset3 Loss:binary_crossentropy Optimizer:rmsprop Dropout:No | ||
Epoch|Loss|Accuracy|Precision|Recall|Fscore | ||
1|0.407210527377|0.913938888889|0.985900796911|0.839888888889|0.907056416533 | ||
2|1.32126423762|0.911833333333|0.986608901142|0.835|0.904495396281 | ||
3|1.34785103439|0.912472222222|0.988100716587|0.835|0.905121796995 | ||
4|1.35150305625|0.913994444444|0.991673374593|0.835|0.906617766813 | ||
5|1.35529757347|0.914011111111|0.991712634274|0.835|0.906634173413 | ||
6|1.34664266568|0.914305555556|0.991718426501|0.835588888889|0.90698361585 | ||
7|1.34180664207|0.916511111111|0.991761557433|0.84|0.909594051544 | ||
8|1.34144855539|0.916577777778|0.991762854145|0.840133333333|0.909672762271 | ||
9|1.34134629022|0.916738888889|0.99176598618|0.840455555556|0.909862932958 | ||
10|1.34128778595|0.916738888889|0.99176598618|0.840455555556|0.909862932958 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes