Skip to content

Commit

Permalink
rename a layer
Browse files Browse the repository at this point in the history
  • Loading branch information
jojonki committed Dec 26, 2017
1 parent 61af8b1 commit 3e5ac9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions layers/attention_net.py → layers/bidaf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from layers.highway import Highway


class AttentionNet(nn.Module):
class BiDAF(nn.Module):
def __init__(self, args):
super(AttentionNet, self).__init__()
super(BiDAF, self).__init__()
self.embd_size = args.w_embd_size
self.d = self.embd_size * 2 # word_embedding + char_embedding
# self.d = self.embd_size # only word_embedding
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from process_data import save_pickle, load_pickle, load_task, load_processed_json, load_glove_weights
from process_data import to_var, to_np, make_vector
from process_data import DataSet
from layers.attention_net import AttentionNet
from layers.bidaf import BiDAF
from ema import EMA
from logger import Logger

Expand Down Expand Up @@ -195,7 +195,7 @@ def test(model, data, batch_size=args.batch_size):
# }}}


model = AttentionNet(args)
model = BiDAF(args)

if torch.cuda.is_available():
print('use cuda')
Expand Down

0 comments on commit 3e5ac9c

Please sign in to comment.