Git Product home page Git Product logo

Comments (6)

nipponjo avatar nipponjo commented on September 23, 2024

你好, I used the following versions for testing: python==3.9.1 torch==1.10.0+cu113 torchvision==0.11.1+cu113 tensorboard==2.7.0 numpy==1.21.1 pyyaml==5.4.1 Pillow==8.3.1

from deepfillv2-pytorch.

tkone2018 avatar tkone2018 commented on September 23, 2024

@nipponjo 好的,谢谢

from deepfillv2-pytorch.

tkone2018 avatar tkone2018 commented on September 23, 2024

@nipponjo Traceback (most recent call last):
File "/app/deepfillv2-pytorch-master/test.py", line 80, in
main()
File "/app/deepfillv2-pytorch-master/test.py", line 36, in main
generator.load_state_dict(generator_state_dict)
File "/opt/conda/envs/deepfill/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1482, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Generator:
Missing key(s) in state_dict: "stage1.conv1.conv.weight", "stage1.conv1.conv.bias", "stage1.down_block1.conv1_downsample.conv.weight", "stage1.down_block1.conv1_downsample.conv.bias", "stage1.down_block1.conv2.conv.weight", "stage1.down_block1.conv2.conv.bias", "stage1.down_block2.conv1_downsample.conv.weight", "stage1.down_block2.conv1_downsample.conv.bias", "stage1.down_block2.conv2.conv.weight", "stage1.down_block2.conv2.conv.bias", "stage1.conv_bn1.conv.weight", "stage1.conv_bn1.conv.bias", "stage1.conv_bn2.conv.weight", "stage1.conv_bn2.conv.bias", "stage1.conv_bn3.conv.weight", "stage1.conv_bn3.conv.bias", "stage1.conv_bn4.conv.weight", "stage1.conv_bn4.conv.bias", "stage1.conv_bn5.conv.weight", "stage1.conv_bn5.conv.bias", "stage1.conv_bn6.conv.weight", "stage1.conv_bn6.conv.bias", "stage1.conv_bn7.conv.weight", "stage1.conv_bn7.conv.bias", "stage1.up_block1.conv1_upsample.conv.conv.weight", "stage1.up_block1.conv1_upsample.conv.conv.bias", "stage1.up_block1.conv2.conv.weight", "stage1.up_block1.conv2.conv.bias", "stage1.up_block2.conv1_upsample.conv.conv.weight", "stage1.up_block2.conv1_upsample.conv.conv.bias", "stage1.up_block2.conv2.conv.weight", "stage1.up_block2.conv2.conv.bias", "stage1.conv_to_rgb.conv.weight", "stage1.conv_to_rgb.conv.bias", "stage2.conv_conv1.conv.weight", "stage2.conv_conv1.conv.bias", "stage2.conv_down_block1.conv1_downsample.conv.weight", "stage2.conv_down_block1.conv1_downsample.conv.bias", "stage2.conv_down_block1.conv2.conv.weight", "stage2.conv_down_block1.conv2.conv.bias", "stage2.conv_down_block2.conv1_downsample.conv.weight", "stage2.conv_down_block2.conv1_downsample.conv.bias", "stage2.conv_down_block2.conv2.conv.weight", "stage2.conv_down_block2.conv2.conv.bias", "stage2.conv_conv_bn1.conv.weight", "stage2.conv_conv_bn1.conv.bias", "stage2.conv_conv_bn2.conv.weight", "stage2.conv_conv_bn2.conv.bias", "stage2.conv_conv_bn3.conv.weight", "stage2.conv_conv_bn3.conv.bias", "stage2.conv_conv_bn4.conv.weight", "stage2.conv_conv_bn4.conv.bias", "stage2.conv_conv_bn5.conv.weight", "stage2.conv_conv_bn5.conv.bias", "stage2.ca_conv1.conv.weight", "stage2.ca_conv1.conv.bias", "stage2.ca_down_block1.conv1_downsample.conv.weight", "stage2.ca_down_block1.conv1_downsample.conv.bias", "stage2.ca_down_block1.conv2.conv.weight", "stage2.ca_down_block1.conv2.conv.bias", "stage2.ca_down_block2.conv1_downsample.conv.weight", "stage2.ca_down_block2.conv1_downsample.conv.bias", "stage2.ca_down_block2.conv2.conv.weight", "stage2.ca_down_block2.conv2.conv.bias", "stage2.ca_conv_bn1.conv.weight", "stage2.ca_conv_bn1.conv.bias", "stage2.ca_conv_bn4.conv.weight", "stage2.ca_conv_bn4.conv.bias", "stage2.ca_conv_bn5.conv.weight", "stage2.ca_conv_bn5.conv.bias", "stage2.conv_bn6.conv.weight", "stage2.conv_bn6.conv.bias", "stage2.conv_bn7.conv.weight", "stage2.conv_bn7.conv.bias", "stage2.up_block1.conv1_upsample.conv.conv.weight", "stage2.up_block1.conv1_upsample.conv.conv.bias", "stage2.up_block1.conv2.conv.weight", "stage2.up_block1.conv2.conv.bias", "stage2.up_block2.conv1_upsample.conv.conv.weight", "stage2.up_block2.conv1_upsample.conv.conv.bias", "stage2.up_block2.conv2.conv.weight", "stage2.up_block2.conv2.conv.bias", "stage2.conv_to_rgb.conv.weight", "stage2.conv_to_rgb.conv.bias". ,你好,帮忙看下,好像是模型不太对?谢谢

from deepfillv2-pytorch.

tkone2018 avatar tkone2018 commented on September 23, 2024

@nipponjo load model error

from deepfillv2-pytorch.

nipponjo avatar nipponjo commented on September 23, 2024

The pretrained weights only work with the models in 'networks_tf.py'. You can include --tfmodel e.g:

python test.py --tfmodel --image examples/inpaint/case1.png --mask examples/inpaint/case1_mask.png --out examples/inpaint/case1_out_test.png --checkpoint pretrained/states_tf_places2.pth

to test with the pretrained weights.

from deepfillv2-pytorch.

tkone2018 avatar tkone2018 commented on September 23, 2024

@nipponjo ok, thank u

from deepfillv2-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.