google-research / big_vision

Official codebase used to develop Vision Transformer, SigLIP, MLP-Mixer, LiT and more.
Apache License 2.0
2.25k stars 147 forks source link

[BUG] in big_vision.models.proj.flexi.vit #76

Closed KennyFu1997 closed 4 months ago

KennyFu1997 commented 10 months ago

Hello, big_vision team! Thanks for your work on the repository. I found two small typo in the flexivit code:

line 194 restored_params = utils.load_params(None, init_file) ==> restored_params = utils.load_params(init_file)

line 205 restored_params["embedding"]["kernel"] = resample_patchemb(old=old_patchemb, new_hw=model_cfg.patch_size) ==> restored_params["embedding"]["kernel"] = resample_patchemb(old=old_patchemb, new_hw=model_cfg.get("patch_size"))

akolesnikoff commented 10 months ago

Hi!

Thanks for flagging!

Flexivit project is currently not in sync with the head. Consider fixing bugs in your local fork for now and/or syncing back to the original commit that introduced Flexvit. I hope we find the capacity to update it in the near future, but can not promise.