jiangyzy / GOAE

[ICCV 2023] Official implementation of "Make Encoder Great Again in 3D GAN Inversion through Geometry and Occlusion-Aware Encoding" in International Conference on Computer Vision (ICCV) 2023.
83 stars 8 forks source link

Unexpected key(s) in state_dict: "swin_model.layers.0.blocks.0.attn.logit_scale" #21

Closed jin1041 closed 3 months ago

jin1041 commented 3 months ago

Thanks for your work, I try to use pretrained models,it raises error image

I installed packages as environments.txt, i don't understand why it happens.

jiangyzy commented 3 months ago

Could you provide your environments info with python -m pip list

jin1041 commented 3 months ago

Thanks for replying, it shows as follows:

Package                Version
---------------------- ---------
absl-py                2.1.0
astunparse             1.6.3
cachetools             4.2.4
certifi                2024.2.2
charset-normalizer     3.3.2
click                  8.1.7
dominate               2.9.1
filelock               3.14.0
fsspec                 2024.5.0
gast                   0.3.3
google-auth            1.35.0
google-auth-oauthlib   0.4.6
google-pasta           0.2.0
grpcio                 1.64.0
h5py                   2.10.0
huggingface-hub        0.23.2
idna                   3.7
imageio                2.9.0
imageio-ffmpeg         0.4.9
importlib_metadata     7.1.0
keras                  2.15.0
Keras-Preprocessing    1.1.2
kornia                 0.7.2
kornia_rs              0.1.3
Markdown               3.6
MarkupSafe             2.1.5
mrcfile                1.5.0
mtcnn                  0.1.1
networkx               3.1
ninja                  1.10.2
numpy                  1.18.5
oauthlib               3.2.2
opencv-python          4.9.0.80
opt-einsum             3.3.0
packaging              24.0
pillow                 10.3.0
pip                    24.0
protobuf               3.20.3
psutil                 5.9.8
pyasn1                 0.6.0
pyasn1_modules         0.4.0
pyspng                 0.1.1
PyWavelets             1.4.1
PyYAML                 6.0.1
requests               2.32.3
requests-oauthlib      2.0.0
rsa                    4.9
safetensors            0.4.3
scikit-image           0.19.3
scipy                  1.9.3
setuptools             69.5.1
six                    1.16.0
tensorboard            2.2.2
tensorboard-plugin-wit 1.8.1
tensorboardX           2.5
tensorflow             2.2.1
tensorflow-estimator   2.2.0
termcolor              2.4.0
tifffile               2023.7.10
timm                   1.0.3
torch                  1.11.0
torchvision            0.12.0
tqdm                   4.66.4
trimesh                4.2.0
typing_extensions      4.12.0
urllib3                2.2.1
Werkzeug               3.0.3
wheel                  0.43.0
wrapt                  1.16.0
yacs                   0.1.8
zipp                   3.19.0
jiangyzy commented 3 months ago

you can try to check if the model is initialized correctly, logit_scale should be in the initialized model layers state dict.