Coder Social home page Coder Social logo

Comments (6)

wangqiang9 avatar wangqiang9 commented on May 18, 2024

TypeError: ddim_sample_loop() missing 3 required positional arguments: 'data', 'raster', and 'loss'

Hi, can you post your full error message?

from sketchknitter.

TO1bHI8Q avatar TO1bHI8Q commented on May 18, 2024

TypeError: ddim_sample_loop() missing 3 required positional arguments: 'data', 'raster', and 'loss'

Hi, can you post your full error message?

When I use sample.py, the weight is also model050000.pt
And “all_images” defined as all in line 55 of sample. py, What is the meaning of ”len (all_images)“?

Traceback (most recent call last):
File "D:/SketchKnitter-main/sample.py", line 95, in
main()
File "D:/SketchKnitter-main/sample.py", line 66, in main
sample, pen_state = sample_fn(
TypeError: ddim_sample_loop() missing 3 required positional arguments: 'data', 'raster', and 'loss'

from sketchknitter.

wangqiang9 avatar wangqiang9 commented on May 18, 2024

data', 'raster', and 'loss'

bug is fix in this pull request: 8250c35

from sketchknitter.

wangqiang9 avatar wangqiang9 commented on May 18, 2024

For example, you can specify data, raster, loss as following:

    loss = th.nn.MSELoss()
    data = load_data(
        data_dir=args.data_dir,
        batch_size=args.batch_size,
        image_size=args.image_size,
        # category=["moon.npz", "airplane.npz", "fish.npz", "umbrella.npz", "train.npz",
        #           "spider.npz", "shoe.npz", "apple.npz", "lion.npz", "bus.npz"],
        category=["apple.npz"],
        class_cond=True,
    )
    raster = AttentionMap().cuda()

from sketchknitter.

TO1bHI8Q avatar TO1bHI8Q commented on May 18, 2024

data', 'raster', and 'loss'

bug is fix in this pull request: 8250c35

You also need to modify the code in line 67 ”sample, pen_ state",replace with "sample, pen_ state,_". Then, it work.
Thanks!

from sketchknitter.

wangqiang9 avatar wangqiang9 commented on May 18, 2024

data', 'raster', and 'loss'

bug is fix in this pull request: 8250c35

You also need to modify the code in line 67 ”sample, pen_ state",replace with "sample, pen_ state,_". Then, it work. Thanks!

Thank you very much for your feedback on the bug, it has been fixed.

from sketchknitter.

Related Issues (16)

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.