Skip to content

Instantly share code, notes, and snippets.

@manuel-delverme
Created May 6, 2017 21:01
Show Gist options
  • Save manuel-delverme/de92f4d79d015a854e3958e8c9674d40 to your computer and use it in GitHub Desktop.
Save manuel-delverme/de92f4d79d015a854e3958e8c9674d40 to your computer and use it in GitHub Desktop.
/usr/bin/python3.5 /home/awok/Documents/sapienza/s1/nlp/hw2/src/homework2.py model ../ ../resources
Using Theano backend.
WARNING (theano.sandbox.cuda): The cuda backend is deprecated and will be removed in the next release (v0.10). Please switch to the gpuarray backend. You can get more information about how to switch at this URL:
https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29
ERROR (theano.sandbox.cuda): nvcc compiler not found on $PATH. Check your nvcc installation and try again.
model_output_path model
homework_dir: ../
model output: model
homework dir: ../
src dir: ../src/
data dir: ../data/
resource dir: ../resources
BORG INITD
BORG INITD
BORG: model load
train ../data/en-ud-train.conllu
Loading data...
load_data ../data/en-ud-train.conllu
cached model for ../data/en-ud-train.conllu failed
add_context 12543
204586 train sequences
load_data ../data/en-ud-dev.conllu
cached model for ../data/en-ud-dev.conllu failed
add_context 2002
Build model...
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
dense_1 (Dense) (None, 4, 4) 1204
_________________________________________________________________
bidirectional_1 (Bidirection (None, 64) 7104
_________________________________________________________________
dense_2 (Dense) (None, 17) 1105
=================================================================
Total params: 9,413
Trainable params: 9,413
Non-trainable params: 0
_________________________________________________________________
None
Train...
Train on 204586 samples, validate on 25148 samples
Epoch 1/10
204586/204586 [==============================] - 29s - loss: 0.9556 - acc: 0.6942 - val_loss: 0.6564 - val_acc: 0.7864
Epoch 2/10
204586/204586 [==============================] - 29s - loss: 0.5804 - acc: 0.8115 - val_loss: 0.5931 - val_acc: 0.8063
Epoch 3/10
204586/204586 [==============================] - 29s - loss: 0.5369 - acc: 0.8241 - val_loss: 0.5666 - val_acc: 0.8130
Epoch 4/10
204586/204586 [==============================] - 29s - loss: 0.5135 - acc: 0.8312 - val_loss: 0.5493 - val_acc: 0.8172
Epoch 5/10
204586/204586 [==============================] - 29s - loss: 0.4992 - acc: 0.8358 - val_loss: 0.5423 - val_acc: 0.8240
Epoch 6/10
204586/204586 [==============================] - 29s - loss: 0.4878 - acc: 0.8397 - val_loss: 0.5381 - val_acc: 0.8232
Epoch 7/10
204586/204586 [==============================] - 29s - loss: 0.4787 - acc: 0.8418 - val_loss: 0.5285 - val_acc: 0.8283
Epoch 8/10
204586/204586 [==============================] - 29s - loss: 0.4718 - acc: 0.8439 - val_loss: 0.5233 - val_acc: 0.8296
Epoch 9/10
204586/204586 [==============================] - 29s - loss: 0.4659 - acc: 0.8462 - val_loss: 0.5160 - val_acc: 0.8315
Epoch 10/10
204586/204586 [==============================] - 29s - loss: 0.4608 - acc: 0.8478 - val_loss: 0.5182 - val_acc: 0.8314
dict_keys(['val_loss', 'val_acc', 'loss', 'acc'])
TEST 0 PASSED
TEST 1 PASSED
BORG INITD
results {'precision': 0.7938175592277186, 'recall': 0.696273366133789, 'coverage': 1.0, 'f1': 0.741852748248231}
TEST 2 PASSED
predicted ['PRON', 'VERB', 'DET', 'ADJ', 'NOUN', 'PUNCT']
TEST 3 PASSED
{'precision': 0.7938175592277186, 'recall': 0.696273366133789, 'coverage': 1.0, 'f1': 0.741852748248231}
. PASSED
/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_gtk3.py:219: Warning: Source ID 8 was not found when attempting to remove it
GLib.source_remove(self._idle_draw_id)
Process finished with exit code 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment