Code Monkey home page Code Monkey logo

Comments (3)

callsys avatar callsys commented on August 21, 2024

1、It seems that you are using the top-1 inference mode, which requires the classification result on your custom dataset (You have to provide it yourself). Maybe you can use the gtk inference mode, which requires no classification result and use the ground-truth class for localization.
2、ckpts/cub983 is our provided checkpoint path. If you have trained your own checkpoint, replace it with your own path!

from genpromp.

SooYoungYang avatar SooYoungYang commented on August 21, 2024

Thank you for the quick response.

However, I am still encountering the same error.
I followed the instructions in the GitHub README and ran the following commands for training:
python main.py --function train_token --config configs/cub.yml --opt "{'train': {'save_path': 'ckpts/cub/'}}"
python main.py --function train_unet --config configs/cub_stage2.yml --opt "{'train': {'load_token_path': 'ckpts/cub/tokens/', 'save_path': 'ckpts/cub/'}}"
The training completed successfully, and the files were generated as shown in the attached image.
image

And i started testing with this command : python main.py --function test --config configs/cub_stage2.yml --opt "{'test' : {'load_token_path' : 'ckpts/cub/tokens/', 'load_unet_path' : 'ckpts/cub/unet_s239/', 'save_log_path' : 'ckpts/cub/log.txt'}}'

(with 'gtk' mode)

but still getting same problem.

In test code,
representative_embeddings = [text_encoder(ids.to(device))[0] for ids in data["caption_ids_concept_token"][-1]]
this code is problem in my case.

In train code, there is similar part to this code, but it was working well( since i successfully finished training.)
combine_embeddings = text_encoder(data["caption_ids_concept_token"])[0]

So, I looked into this issue thoroughly. In the training phase, the shape of data["caption_ids_concept_token"] that goes into text_encoder is [4, 77], where 4 is the training batch size. However, during testing, when ids.to(device) is passed into text_encoder, it is being processed 1 id at a time. As a result, its shape is [], which seems to be causing the problem.

from genpromp.

callsys avatar callsys commented on August 21, 2024

I can't locate the problem at the moment. You can download another unmodified copy of the code and use the provided checkpoint to inference, and then compare the differences to find the problem.

from genpromp.

Related Issues (12)

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.