facebookresearch / facebookresearch/sam2
conflict of "gamma" attribute
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, thanks for your nice work.
During employing your SAM-2 as submodule to train another model using [transformers](https://github.com/huggingface/transformers) api, information below is printed when we use "xxxModel.frompretrained(...)"
```
A parameter name that contains `gamma` will be renamed internally to `weight`. Please use a different name to suppress this warning.
Some weights of the model checkpoint at xxx were not used when initializing xxxModel: ['visual_model.memory_encoder.fuser.layers.0.weight', 'visual_model.memory_encoder.fuser.layers.1.weight']
```
maybe "gamma" in "memory_encoder.fuser.layers.0" and "memory_encoder.fuser.layers.1" should be renamed for better usability? The question may result from [here](https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L698).
Any suggestions for overcoming this problem would be helpful, thanks again!
Contributor guide
Assessment
This issue has not been assessed yet.