unilm
unilm copied to clipboard
got an unexpected keyword argument 'distilled'
Describe the bug Model I am using (UniLM, MiniLM, LayoutLM ...):
The problem arises when using:
- [ ] the official example scripts: (give details below)
- [ ] my own modified scripts: (give details below)
A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior: 1. 2. 3.
Expected behavior A clear and concise description of what you expected to happen.
- Platform:
- Python version:
- PyTorch version (GPU?):
The parameters distilled
and pretrained_cfg
are in the **kwargs
dict but should not be when it is passed to VisionTransformer
's init
function.
I added the following right before the super().__init__(*args, **kwargs)
The modified version in the class AdaptedVisionTransformer(VisionTransformer):
line now looks like this:
self.distilled = kwargs.pop('distilled')
self.pretrained_cfg = kwargs.pop('pretrained_cfg')
super().__init__(*args, **kwargs)
The parameters
distilled
andpretrained_cfg
are in the**kwargs
dict but should not be when it is passed toVisionTransformer
'sinit
function.I added the following right before the
super().__init__(*args, **kwargs)
The modified version in the
class AdaptedVisionTransformer(VisionTransformer):
line now looks like this:self.distilled = kwargs.pop('distilled') self.pretrained_cfg = kwargs.pop('pretrained_cfg') super().__init__(*args, **kwargs)
Thank you.