Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
update RNN GAN example code
Browse files Browse the repository at this point in the history
  • Loading branch information
keon committed Oct 7, 2019
1 parent dc050ab commit 4eec99c
Show file tree
Hide file tree
Showing 6 changed files with 494 additions and 2,280 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@
}
],
"source": [
"seq2seq = Seq2Seq(vocab_size, 16)\n",
"print(seq2seq)"
"seq2seq = Seq2Seq(vocab_size, 16)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def _init_state(self, batch_size=1):


seq2seq = Seq2Seq(vocab_size, 16)
print(seq2seq)


criterion = nn.CrossEntropyLoss()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@
],
"source": [
"model = BasicGRU(1, 256, vocab_size, 128, n_classes, 0.5).to(DEVICE)\n",
"optimizer = torch.optim.Adam(model.parameters(), lr=lr)\n",
"print(model)"
"optimizer = torch.optim.Adam(model.parameters(), lr=lr)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def evaluate(model, val_iter):

model = BasicGRU(1, 256, vocab_size, 128, n_classes, 0.5).to(DEVICE)
optimizer = torch.optim.Adam(model.parameters(), lr=lr)
print(model)


best_val_loss = None
Expand Down
Loading

0 comments on commit 4eec99c

Please sign in to comment.