Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Inconsistent BatchSize #8

Closed
HMJiangGatech opened this issue Jun 3, 2020 · 2 comments
Closed

Inconsistent BatchSize #8

HMJiangGatech opened this issue Jun 3, 2020 · 2 comments

Comments

@HMJiangGatech
Copy link

for i in tqdm(list(range(0, ceil))):
start_ind = i * batch_size
end_ind = min(i * batch_size + batch_size, len(selfplay_data))
batch_data = selfplay_data[start_ind:end_ind]
batch_kb = selfplay_kb[start_ind:end_ind]
# we indicaet to let agent1 to talk first. Keep in mind that we will
# swap between agent1 and agent2.
speaker = flip % 2
generated_data, _, summary = dialogue.talk(hparams.max_dialogue_len,
batch_data, batch_kb, agent1,
agent2, worker_step,
batch_size, speaker)

In line 144, we should replace batch_size by end_ind-start_ind. Otherwise, there will be an inconsistent batchsize issue in the last iteration.

@josephch405
Copy link
Contributor

This will be fixed in #6

@josephch405
Copy link
Contributor

Address in #10

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants