Skip to content

Instantly share code, notes, and snippets.

@manuel-delverme
Created May 6, 2017 22:17
Show Gist options
  • Save manuel-delverme/27f645f700908c60f15345658868fb82 to your computer and use it in GitHub Desktop.
Save manuel-delverme/27f645f700908c60f15345658868fb82 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
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
bidirectional_1 (Bidirection (None, 128) 140160
_________________________________________________________________
dense_1 (Dense) (None, 17) 2193
=================================================================
Total params: 142,353
Trainable params: 142,353
Non-trainable params: 0
_________________________________________________________________
None
Train...
Train on 204586 samples, validate on 25148 samples
Epoch 1/10
204586/204586 [==============================] - 81s - loss: 0.6422 - acc: 0.7935 - val_loss: 0.4778 - val_acc: 0.8445
Epoch 2/10
204586/204586 [==============================] - 81s - loss: 0.3892 - acc: 0.8696 - val_loss: 0.4324 - val_acc: 0.8596
Epoch 3/10
204586/204586 [==============================] - 83s - loss: 0.3419 - acc: 0.8845 - val_loss: 0.4349 - val_acc: 0.8601
Epoch 4/10
204586/204586 [==============================] - 82s - loss: 0.3096 - acc: 0.8946 - val_loss: 0.4312 - val_acc: 0.8628
Epoch 5/10
204586/204586 [==============================] - 83s - loss: 0.2824 - acc: 0.9034 - val_loss: 0.4254 - val_acc: 0.8648
Epoch 6/10
204586/204586 [==============================] - 83s - loss: 0.2594 - acc: 0.9114 - val_loss: 0.4300 - val_acc: 0.8659
Epoch 7/10
204586/204586 [==============================] - 84s - loss: 0.2385 - acc: 0.9183 - val_loss: 0.4419 - val_acc: 0.8674
Epoch 8/10
204586/204586 [==============================] - 83s - loss: 0.2199 - acc: 0.9244 - val_loss: 0.4585 - val_acc: 0.8658
Epoch 9/10
204586/204586 [==============================] - 82s - loss: 0.2033 - acc: 0.9292 - val_loss: 0.4781 - val_acc: 0.8650
Epoch 10/10
204586/204586 [==============================] - 83s - loss: 0.1876 - acc: 0.9354 - val_loss: 0.4896 - val_acc: 0.8632
dict_keys(['val_loss', 'acc', 'loss', 'val_acc'])
TEST 0 PASSED
TEST 1 PASSED
BORG INITD
results {'precision': 0.8308865294449895, 'recall': 0.7819947376774347, 'coverage': 1.0, 'f1': 0.8056995972087635}
TEST 2 PASSED
predicted ['PRON', 'VERB', 'DET', 'ADJ', 'NOUN', 'PUNCT']
TEST 3 PASSED
{'precision': 0.8308865294449895, 'recall': 0.7819947376774347, 'coverage': 1.0, 'f1': 0.8056995972087635}
. 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