Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Flor Miriam Plaza del Arco
/
WASSA 2018
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7eff927d
authored
Jul 06, 2018
by
geni
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
The end.
parent
6c181c12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
embeddings_RNN.py
embeddings_lexicon_features_emotion_RNN.py
embeddings_RNN.py
View file @
7eff927d
...
...
@@ -160,12 +160,12 @@ def classification_embedings_rnn(tweets_train, tweets_train_labels_numeric, twee
#model.add(LSTM(128, return_sequences=True))
model
.
add
(
Bidirectional
(
LSTM
(
128
,
return_sequences
=
True
)))
#model.add(Dense(128, activation='relu', kernel_initializer=glorot_uniform(seed=RANDOM_SEED), activity_regularizer=regularizers.l2(0.0001)))
model
.
add
(
Dense
(
128
,
activation
=
'relu'
,
kernel_initializer
=
glorot_uniform
(
seed
=
RANDOM_SEED
)
,
kernel_regularizer
=
regularizers
.
l2
(
0.01
)
))
model
.
add
(
Dense
(
128
,
activation
=
'relu'
,
kernel_initializer
=
glorot_uniform
(
seed
=
RANDOM_SEED
)))
model
.
add
(
Dropout
(
0.5
))
model
.
add
(
MaxPooling1D
(
pool_size
=
2
,
strides
=
1
,
padding
=
"same"
))
model
.
add
(
Flatten
())
#model.add(Dense(64, activation='relu', kernel_initializer=glorot_uniform(seed=RANDOM_SEED), activity_regularizer=regularizers.l2(0.001)))
model
.
add
(
Dense
(
64
,
activation
=
'relu'
,
kernel_initializer
=
glorot_uniform
(
seed
=
RANDOM_SEED
)
,
kernel_regularizer
=
regularizers
.
l2
(
0.01
)
))
model
.
add
(
Dense
(
64
,
activation
=
'relu'
,
kernel_initializer
=
glorot_uniform
(
seed
=
RANDOM_SEED
)))
model
.
add
(
Dropout
(
0.5
))
#model.add(Dropout(0.25))
#model.add(Dense(16, activation='relu', kernel_initializer=glorot_uniform(seed=RANDOM_SEED), activity_regularizer=regularizers.l2(0.001)))
...
...
embeddings_lexicon_features_emotion_RNN.py
View file @
7eff927d
...
...
@@ -236,18 +236,18 @@ def classification_embedings_rnn(tweets_train, tweets_train_labels_numeric, twee
#model.add(LSTM(128, return_sequences=True))
model
.
add
(
Bidirectional
(
LSTM
(
128
,
return_sequences
=
True
)))
#model.add(Dense(128, activation='relu', kernel_initializer=glorot_uniform(seed=RANDOM_SEED), activity_regularizer=regularizers.l2(0.0001)))
model
.
add
(
Dense
(
128
,
activation
=
'relu'
,
kernel_initializer
=
glorot_uniform
(
seed
=
RANDOM_SEED
)
,
kernel_regularizer
=
regularizers
.
l2
(
0.01
)
))
model
.
add
(
Dense
(
128
,
activation
=
'relu'
,
kernel_initializer
=
glorot_uniform
(
seed
=
RANDOM_SEED
)))
model
.
add
(
Dropout
(
0.5
))
model
.
add
(
MaxPooling1D
(
pool_size
=
2
,
strides
=
1
,
padding
=
"same"
))
model
.
add
(
Flatten
())
#model.add(Dense(64, activation='relu', kernel_initializer=glorot_uniform(seed=RANDOM_SEED), activity_regularizer=regularizers.l2(0.001)))
model
.
add
(
Dense
(
64
,
activation
=
'relu'
,
kernel_initializer
=
glorot_uniform
(
seed
=
RANDOM_SEED
)
,
kernel_regularizer
=
regularizers
.
l2
(
0.01
)
))
model
.
add
(
Dense
(
64
,
activation
=
'relu'
,
kernel_initializer
=
glorot_uniform
(
seed
=
RANDOM_SEED
)))
model
.
add
(
Dropout
(
0.5
))
#model.add(Dropout(0.25))
#model.add(Dense(16, activation='relu', kernel_initializer=glorot_uniform(seed=RANDOM_SEED), activity_regularizer=regularizers.l2(0.001)))
#model.add(Dropout(0.5))
model
.
add
(
Dense
(
len
(
CLASSES
),
activation
=
'softmax'
))
model
.
add
(
ActivityRegularization
(
l1
=
0.0
,
l2
=
0.00
0
1
))
model
.
add
(
ActivityRegularization
(
l1
=
0.0
,
l2
=
0.001
))
# summarize the model
print
(
model
.
summary
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment