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
80e851ea
authored
Jun 28, 2018
by
Flor Miriam Plaza del Arco
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Tercera versión script
parent
f80fe0a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
embeddings_RNN.py
embeddings_RNN.py
View file @
80e851ea
...
...
@@ -150,13 +150,13 @@ def classification_embedings_rnn(tweets_train, tweets_train_labels_numeric, twee
# summarize the model
print
(
model
.
summary
())
print
(
"
compilando modelo
"
)
print
(
"
Compiling the model...
"
)
# compile the model
model
.
compile
(
optimizer
=
'adam'
,
loss
=
'categorical_crossentropy'
,
metrics
=
[
'acc'
])
print
(
"
entrenando
"
)
print
(
"
Training the model...
"
)
model
.
fit
(
train_features_pad
,
tweets_train_labels_numeric
,
batch_size
=
32
,
epochs
=
10
,
verbose
=
0
)
loss
,
accuracy
=
model
.
evaluate
(
train_features_pad
,
tweets_train_labels_numeric
,
verbose
=
0
)
print
(
'Accuracy:
%
f'
%
(
accuracy
*
100
))
print
(
'Accuracy
trainning
:
%
f'
%
(
accuracy
*
100
))
#prediction
tweets_dev_classified_labels
=
model
.
predict_classes
(
padded_docs_dev
,
batch_size
=
32
,
verbose
=
1
)
...
...
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