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

ITM Objectives task will not be enabled? #48

Open
CQUTWangHong opened this issue Jan 4, 2022 · 2 comments
Open

ITM Objectives task will not be enabled? #48

CQUTWangHong opened this issue Jan 4, 2022 · 2 comments

Comments

@CQUTWangHong
Copy link

hello, @dandelin

I have tracked the code at vilt_module.py

from the training_step function -> set_task function

pl_module.current_tasks = [
        k for k, v in pl_module.hparams.config["loss_names"].items() if v >= 1
    ]

ITM task will enabled only when v>=1

However, no matter what pre training task, all ITM parameters are set to 0.5 in config.py

Is there a problem with my understanding?

thank you!

@CQUTWangHong
Copy link
Author

CQUTWangHong commented Jan 5, 2022

Another question

names = ["f30k_caption_karpathy_test"] when split == "val" or "test" at loading f30k dataset

but, it is necessary to run get_false_Image or get_false_text function during the test phase?

def get_suite(self, index):
        result = None
        while result is None:
            try:
                ret = dict()
                ret.update(self.get_image(index))
                if not self.image_only:
                    txt = self.get_text(index)
                    ret.update({"replica": True if txt["cap_index"] > 0 else False})
                    ret.update(txt)

                for i in range(self.draw_false_image):
——>                 ret.update(self.get_false_image(i))
                for i in range(self.draw_false_text):
——>                 ret.update(self.get_false_text(i))
                result = True
            except Exception as e:
                print(f"Error while read file idx {index} in {self.names[0]} -> {e}")
                index = random.randint(0, len(self.index_mapper) - 1)
        return ret

thx!

@CQUTWangHong
Copy link
Author

hi, @dandelin

Run the rank loop before each epoch. It takes me a lot of time , so what the program rank loop is doing during fine-tune?

rank loop: 100%|████████████████████████████████████████████████████████████████████████| 250/250 [3:42:38<00:00, 53.43s/it]

thank you!

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

1 participant