Comments (3)
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.
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.
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.
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)
- Inference on arbitrary images HOT 1
- the embeddings in training process HOT 4
- I'm confused about how to make only the concept token embedding learnable HOT 2
- When do `train_unet`, Why don't you use pretrained weight of tokens? HOT 1
- Google Drive download path is invalid. HOT 2
- Asking for questions about evaluation HOT 10
- Google Drive link does not work HOT 2
- Clarification Needed on Model Selection Strategy Across Epochs HOT 1
- RuntimeError: CUDA out of memory. HOT 1
- test visulization HOT 1
- The parameter `test.combine_ratio` seem invalid when running inference HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genpromp.