diff --git a/scripts/ast/run.sh b/scripts/ast/run.sh index e506c8b..b65c8e3 100755 --- a/scripts/ast/run.sh +++ b/scripts/ast/run.sh @@ -1,3 +1,3 @@ #!/bin/bash -./scripts/ast/train.sh nt2n_base 04Jul_nt2n_base_new_embedding_size \ No newline at end of file +./scripts/ast/train.sh nt2n_base_attention_plus_layered 04Jun_nt2n_base_attention_plus_layered_new_embedding_size \ No newline at end of file diff --git a/scripts/ast/train.sh b/scripts/ast/train.sh index d584aeb..357dbb4 100755 --- a/scripts/ast/train.sh +++ b/scripts/ast/train.sh @@ -13,7 +13,7 @@ PYTHONPATH=. python3 -m cProfile -o program.prof zerogercrnn/experiments/ast_lev --data_limit 100000 \ --model_save_dir saved/$2 \ --seq_len 50 \ - --batch_size 80 \ + --batch_size 128 \ --learning_rate 0.001 \ --epochs 8 \ --decay_after_epoch 0 \ diff --git a/zerogercrnn/experiments/ast_level/common.py b/zerogercrnn/experiments/ast_level/common.py index 4b81a24..f7e06a8 100644 --- a/zerogercrnn/experiments/ast_level/common.py +++ b/zerogercrnn/experiments/ast_level/common.py @@ -153,7 +153,7 @@ def optimize(self, loss): # Backward pass loss.backward() torch.nn.utils.clip_grad_norm_(filter_requires_grad(self.model.parameters()), 5) - # torch.nn.utils.clip_grad_norm_(filter_requires_grad(self.model.sparse_parameters()), 5) + torch.nn.utils.clip_grad_norm_(filter_requires_grad(self.model.sparse_parameters()), 5) # Optimizer step for optimizer in self.optimizers: