You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by dl...@apache.org on 2016/12/13 16:48:18 UTC
svn commit: r1774051 - in /ctakes/trunk/ctakes-temporal/scripts/nn:
classify.sh cnn_train_position.py dataset.pyc train.sh
Author: dligach
Date: Tue Dec 13 16:48:17 2016
New Revision: 1774051
URL: http://svn.apache.org/viewvc?rev=1774051&view=rev
Log:
fixed minor bugs/typos
Modified:
ctakes/trunk/ctakes-temporal/scripts/nn/classify.sh
ctakes/trunk/ctakes-temporal/scripts/nn/cnn_train_position.py
ctakes/trunk/ctakes-temporal/scripts/nn/dataset.pyc
ctakes/trunk/ctakes-temporal/scripts/nn/train.sh
Modified: ctakes/trunk/ctakes-temporal/scripts/nn/classify.sh
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/scripts/nn/classify.sh?rev=1774051&r1=1774050&r2=1774051&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/scripts/nn/classify.sh (original)
+++ ctakes/trunk/ctakes-temporal/scripts/nn/classify.sh Tue Dec 13 16:48:17 2016
@@ -1,7 +1,7 @@
#!/bin/bash
source $(dirname $0)/env/bin/activate
-python $(dirname $0)/cnn_classify.py $*
+python $(dirname $0)/cnn_classify_position.py $*
ret=$?
deactivate
exit $ret
Modified: ctakes/trunk/ctakes-temporal/scripts/nn/cnn_train_position.py
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/scripts/nn/cnn_train_position.py?rev=1774051&r1=1774050&r2=1774051&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/scripts/nn/cnn_train_position.py (original)
+++ ctakes/trunk/ctakes-temporal/scripts/nn/cnn_train_position.py Tue Dec 13 16:48:17 2016
@@ -42,7 +42,7 @@ def main(args):
pickle.dump(maxlen, open(os.path.join(working_dir, 'maxlen.p'),"wb"))
pickle.dump(provider.word2int, open(os.path.join(working_dir, 'word2int.p'),"wb"))
pickle.dump(provider.label2int, open(os.path.join(working_dir, 'label2int.p'),"wb"))
- pickle.dump(provider.tdis2int, open(os.path.join(working_dir, 'tdist2int.p'),"wb"))
+ pickle.dump(provider.tdist2int, open(os.path.join(working_dir, 'tdist2int.p'),"wb"))
pickle.dump(provider.edist2int, open(os.path.join(working_dir, 'edist2int.p'),"wb"))
branches = [] # models to be merged
@@ -107,10 +107,10 @@ def main(args):
validation_split=0.1,
class_weight=None)
- json_string = model.to_json()
- open(os.path.join(working_dir, 'model_0.json'), 'w').write(json_string)
- model.save_weights(os.path.join(working_dir, 'model_0.h5'), overwrite=True)
- sys.exit(0)
+ json_string = model.to_json()
+ open(os.path.join(working_dir, 'model_0.json'), 'w').write(json_string)
+ model.save_weights(os.path.join(working_dir, 'model_0.h5'), overwrite=True)
+ sys.exit(0)
if __name__ == "__main__":
main(sys.argv[1:])
Modified: ctakes/trunk/ctakes-temporal/scripts/nn/dataset.pyc
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/scripts/nn/dataset.pyc?rev=1774051&r1=1774050&r2=1774051&view=diff
==============================================================================
Binary files - no diff available.
Modified: ctakes/trunk/ctakes-temporal/scripts/nn/train.sh
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/scripts/nn/train.sh?rev=1774051&r1=1774050&r2=1774051&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/scripts/nn/train.sh (original)
+++ ctakes/trunk/ctakes-temporal/scripts/nn/train.sh Tue Dec 13 16:48:17 2016
@@ -1,7 +1,7 @@
#!/bin/bash
source $(dirname $0)/env/bin/activate
-python $(dirname $0)/cnn_train.py $*
+python $(dirname $0)/cnn_train_position.py $*
ret=$?
deactivate
exit $ret