Commit 5765e3d2 authored by Florian RICHOUX's avatar Florian RICHOUX

Change LSTM 64 maxpool2 to 3

parent 8b4eab38
......@@ -11,7 +11,7 @@ import data_loader as dl
#import mail_callback
from models.lstm32_3conv3_2dense import LSTM32_3Conv3_2Dense
from models.lstm32_3conv3_2dense_shared import LSTM32_3Conv3_2Dense_S
from models.lstm64_3conv2_2dense_shared import LSTM64_3Conv2_2Dense_S
from models.lstm64_3conv3_2dense_shared import LSTM64_3Conv3_2Dense_S
from models.fc6_embed3_2dense import FC6_Embed3_2Dense
from models.fc2_2dense import FC2_2Dense
......@@ -66,8 +66,8 @@ def factory_model( model_name ):
return LSTM32_3Conv3_2Dense(), 'lstm32_3conv3_2dense'
elif model_name == 'lstm32_3conv3_2dense_shared':
return LSTM32_3Conv3_2Dense_S(), 'lstm32_3conv3_2dense_shared'
elif model_name == 'lstm64_3conv2_2dense_shared':
return LSTM64_3Conv2_2Dense_S(), 'lstm64_3conv2_2dense_shared'
elif model_name == 'lstm64_3conv3_2dense_shared':
return LSTM64_3Conv3_2Dense_S(), 'lstm64_3conv3_2dense_shared'
elif model_name == 'fc6_embed3_2dense':
return FC6_Embed3_2Dense(), 'fc6_embed3_2dense'
elif model_name == 'fc2_2dense':
......@@ -103,7 +103,7 @@ def make_parser():
parser.add_argument('-train', type=str, help='File containing the training set')
parser.add_argument('-val', type=str, help='File containing the validation set')
parser.add_argument('-test', type=str, help='File containing the test set')
parser.add_argument('-model', type=str, help='choose among: lstm32_3conv3_2dense, lstm32_3conv3_2dense_shared, lstm64_3conv2_2dense_shared, fc6_embed3_2dense, fc2_2dense')
parser.add_argument('-model', type=str, help='choose among: lstm32_3conv3_2dense, lstm32_3conv3_2dense_shared, lstm64_3conv3_2dense_shared, fc6_embed3_2dense, fc2_2dense')
parser.add_argument('-epochs', type=int, default=50, help='Number of epochs [default: 50]')
parser.add_argument('-batch', type=int, default=64, help='Batch size [default: 64]')
parser.add_argument('-patience', type=int, default=0, help='Number of epochs before triggering the early stopping criterion [default: infinite patience]')
......
......@@ -6,19 +6,19 @@ import tensorflow as tf
from models.abstract_model import AbstractModel
class LSTM64_3Conv2_2Dense_S(AbstractModel):
class LSTM64_3Conv3_2Dense_S(AbstractModel):
def __init__(self):
super().__init__()
def get_model(self):
conv1 = layers.Conv1D(5, 20, activation='relu')
pool1 = layers.MaxPooling1D(2)
pool1 = layers.MaxPooling1D(3)
batchnorm1 = layers.BatchNormalization()
conv2 = layers.Conv1D(5, 20, activation='relu')
pool2 = layers.MaxPooling1D(2)
pool2 = layers.MaxPooling1D(3)
batchnorm2 = layers.BatchNormalization()
conv3 = layers.Conv1D(5, 20, activation='relu')
pool3 = layers.MaxPooling1D(2)
pool3 = layers.MaxPooling1D(3)
batchnorm3 = layers.BatchNormalization()
lstm = layers.LSTM(64)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment