Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About batch_ size #4

Open
Rouchestand opened this issue Mar 29, 2023 · 5 comments
Open

About batch_ size #4

Rouchestand opened this issue Mar 29, 2023 · 5 comments

Comments

@Rouchestand
Copy link

Set caption_img_path to ./examples and batch_size to 2. Running run.py will result in the following error:
Traceback (most recent call last):
File "run.py", line 162, in
run_control(run_type, args, img_dir, lm_model, lm_tokenizer, clip, token_mask)
File "run.py", line 87, in run_control
gen_texts, clip_scores = control_generate_caption(lm_model, clip, lm_tokenizer, image_instance, token_mask,
File "/home/bishe/prc/ConZIC-main/ConZIC-main/control_gen_utils.py", line 200, in control_generate_caption
generate_texts, clip_scores = sentiment_sequential_generation(model, clip, tokenizer, image_instance, token_mask, prompt,
File "/home/bishe/prc/ConZIC-main/ConZIC-main/control_gen_utils.py", line 54, in sentiment_sequential_generation
topk_inp[:, ii + seed_len] = idxs_
RuntimeError: The expanded size of the tensor (400) must match the existing size (200) at non-singleton dimension 0. Target sizes: [400]. Tensor sizes: [200]

@joeyz0z
Copy link
Owner

joeyz0z commented Mar 29, 2023

Currently, our released code is a simple demo, only supporting batch_size=1, we will consider updating our released code in the future.

@Rouchestand
Copy link
Author

Thank you for your warm answer. Looking forward to your code update

@BeiyuXuboL
Copy link

Can you tell me the batch-size value of the experiment in the paper?

@joeyz0z
Copy link
Owner

joeyz0z commented Sep 11, 2023

We set batch_size==1 in our paper.

@BeiyuXuboL
Copy link

Thank you for your reply.

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

No branches or pull requests

3 participants