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

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexholdenmiller committed May 22, 2017
1 parent 9102341 commit 4666e33
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions parlai/agents/rnn_baselines/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def update(self, xs, ys):
# first encode context
xes = self.lt(xs).t()
h0 = self.init_zeros(batchsize)
# c0 = self.init_zeros(batchsize)
_output, hn = self.encoder(xes, h0)

# start with EOS tensor for all
Expand All @@ -154,8 +153,8 @@ def update(self, xs, ys):
x = Variable(x)
xe = self.lt(x).unsqueeze(1)
xes = torch.cat([xe for _ in range(batchsize)], 1)
import pdb; pdb.set_trace()

This comment has been minimized.

Copy link
@jaseweston

jaseweston May 24, 2017

Contributor

remove?


# cn = self.init_zeros(batchsize)
output_lines = [[] for _ in range(batchsize)]

self.zero_grad()
Expand Down Expand Up @@ -188,7 +187,6 @@ def predict(self, xs):
# first encode context
xes = self.lt(xs).t()
h0 = self.init_zeros(batchsize)
# c0 = self.init_zeros(batchsize)
_output, hn = self.encoder(xes, h0)

# start with EOS tensor for all
Expand All @@ -199,7 +197,6 @@ def predict(self, xs):
xe = self.lt(x).unsqueeze(1)
xes = torch.cat([xe for _ in range(batchsize)], 1)

# cn = self.init_zeros(batchsize)
done = [False for _ in range(batchsize)]
total_done = 0
max_len = 0
Expand Down

0 comments on commit 4666e33

Please sign in to comment.