Skip to content

Commit

Permalink
ready to submit
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentebolea committed Jun 18, 2018
1 parent 8c3e9a6 commit b174a86
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Based on the following independent variable:
2. Ten different detecting stations's P-wave arrival time.

## REQUIREMENTS
1. Having a dedicated NVIDIA GPU
1. Having a dedicated NVIDIA GPU + CUDA 8.0

## INSTALLING

Expand All @@ -22,6 +22,10 @@ Based on the following independent variable:

$ pipenv run python ./driver.py

Our models start converging at a number of epochs = 2000. Thus to Change the number of epochs:

$ EPOCHS=3000 pipenv run python ./driver.py

## AUTHORS

Hero | email
Expand Down
17 changes: 12 additions & 5 deletions driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
["model_location", "./dataset/NN_test_Y_eqLoc.mat", "data_eqLoc"]
]

BATCH_SIZE = 50
BATCH_SIZE = 100

EPOCHS = 2000
if 'EPOCHS' in environ:
EPOCHS = int(environ['EPOCHS'])


scores = { }
for setup in tests:
train_x, train_y, test_x, test_y = prepare_features(setup[1], setup[2])
model_factory = model_create(setup[0],53)
Expand All @@ -38,8 +39,14 @@
verbose=1,
validation_split=0.2)

score = model.evaluate(test_x, test_y, verbose=0)
print('Test loss:', score[0])
print('Test mse:', score[1])
scores[setup[2]] = model.evaluate(test_x, test_y, verbose=0)
#print('Test loss:', score[0])
#print('Test mse:', score[1])

embed()

for name,score in scores.iteritems():
print "TEST NAME: ", name
print "Total MSE: ", score[1]


#embed()
5 changes: 2 additions & 3 deletions model_depth.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ class ModelDepth(ModelFactory):
def create(self):
model = Sequential()
model.add(Dense(53, init='normal', input_shape=(self.dim,), activation='relu'))
model.add(Dense(8, activation='relu'))
model.add(Dense(5, activation='relu'))
model.add(Dense(1, init='normal')) #, activation='elu'))
model.add(Dense(20, activation='relu'))
model.add(Dense(1, init='normal'))
self.model = model
return model
2 changes: 1 addition & 1 deletion model_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def create(self):
model = Sequential()
model.add(Dense(53, init='normal', input_shape=(self.dim,), activation='relu'))
model.add(Dense(10, activation='relu'))
model.add(Dense(2, init='normal')) #, activation='elu'))
model.add(Dense(2, init='normal'))
self.model = model
return model

2 changes: 1 addition & 1 deletion model_magnitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ def create(self):
model = Sequential()
model.add(Dense(53, init='normal', input_shape=(self.dim,), activation='relu'))
model.add(Dense(10, activation='relu'))
model.add(Dense(1, init='normal')) #, activation='elu'))
model.add(Dense(1, init='normal'))
self.model = model
return model
2 changes: 1 addition & 1 deletion model_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ def create(self):
model = Sequential()
model.add(Dense(53, init='normal', input_shape=(self.dim,), activation='relu'))
model.add(Dense(10, activation='relu'))
model.add(Dense(1, init='normal')) #, activation='elu'))
model.add(Dense(1, init='normal'))
self.model = model
return model

0 comments on commit b174a86

Please sign in to comment.