aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/bidirectional_tgtcls_1.py2
-rwxr-xr-xtrain.py9
2 files changed, 7 insertions, 4 deletions
diff --git a/config/bidirectional_tgtcls_1.py b/config/bidirectional_tgtcls_1.py
index 673c1e4..ade2594 100644
--- a/config/bidirectional_tgtcls_1.py
+++ b/config/bidirectional_tgtcls_1.py
@@ -26,7 +26,7 @@ embed_weights_init = IsotropicGaussian(0.01)
weights_init = IsotropicGaussian(0.1)
biases_init = Constant(0.01)
-batch_size = 20
+batch_size = 50
batch_sort_size = 20
max_splits = 100
diff --git a/train.py b/train.py
index fb50a2f..b4ef774 100755
--- a/train.py
+++ b/train.py
@@ -14,7 +14,7 @@ import fuel
from blocks import roles
from blocks.algorithms import AdaDelta, CompositeRule, GradientDescent, RemoveNotFinite, StepRule, Momentum
-from blocks.extensions import Printing, FinishAfter
+from blocks.extensions import Printing, FinishAfter, ProgressBar
from blocks.extensions.monitoring import DataStreamMonitoring, TrainingDataMonitoring
blocks.config.default_seed = 123
@@ -37,8 +37,8 @@ from ext_test import RunOnTest
logger = logging.getLogger(__name__)
if __name__ == "__main__":
- if len(sys.argv) < 2 or len(sys.argv) > 3:
- print >> sys.stderr, 'Usage: %s [--tvt | --largevalid] config' % sys.argv[0]
+ if len(sys.argv) < 2 or len(sys.argv) > 4:
+ print >> sys.stderr, 'Usage: %s [--tvt | --largevalid] [--progress] config' % sys.argv[0]
sys.exit(1)
model_name = sys.argv[-1]
config = importlib.import_module('.%s' % model_name, 'config')
@@ -125,6 +125,9 @@ if __name__ == "__main__":
stream,
every_n_batches=10000),
]
+
+ if '--progress' in sys.argv:
+ extensions.append(ProgressBar())
if use_plot:
extensions.append(Plot(model_name,