Skip to content

Commit

Permalink
removed the offset (facebookresearch#4331)
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtaba-komeili authored Jan 27, 2022
1 parent 6fbd1a3 commit d6b2fb1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions projects/blenderbot2/agents/sub_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,10 @@ def generate_memories(
"""
assert self.agent_dict is not None
memories = []
offset = 0
for idx, i in enumerate(input):
for idx, input_i in enumerate(input):
if num_inputs[idx] == 0:
continue
context_lines_vec = i[offset : offset + num_inputs[idx]]
offset += num_inputs[idx]
context_lines_vec = input_i[: num_inputs[idx]]
context_lines = [
self.agent_dict.vec2txt(self.clean_input(j)) for j in context_lines_vec
]
Expand Down

0 comments on commit d6b2fb1

Please sign in to comment.