Comments (8)
That's also my confusion. I guess instead of using random values, the embedding weights was used and reshaped. Maybe it's the same. But is it trainable?. I'll appreciate an answer if you've gotten the answer
from detr.
I have implemented DETR and found that embedding weights is more convenient than random values when building a model.
from detr.
I have implemented DETR and found that embedding weights is more convenient than random values when building a model.
Thanks for helping.
Assuming:
embedding=nn.Embedding(45, 2)
weights=embedding.weight.unsqueeze(1).repeat(1,3)
Did you keep the weights requires_grad=True. This is just my confusion
from detr.
Yes, so that the gradient of embedding weight will have the same value.
from detr.
Yes, so that the gradient of embedding weight will have the same value.
Thanks for your answer.
I should keep requires_grad set to 'True.' That means it will also be trained during backpropagation, and the value will change. This applies to the embedding weights, specifically the query embedding.
from detr.
Yes, so that the gradient of embedding weight will have the same value.
I think it's in (num_queries, batch_size, dim) and not (batch_size, num_queries, dim)
from detr.
You are right!
from detr.
I have implemented DETR and found that embedding weights is more convenient than random values when building a model.
@Zhong-Zi-Zeng What do you mean with more convenient? Is it that the results are better? Because, as shown in the DETR colab notebook, if you use, nn.Parameter(torch.rand(100, hidden_dim))
as the queries with 100 being the num_queries and update all parameters of the model, it should still work because the nn.parameter
has requires_grad=True
by default, so it will still update the parameters, right? It will not be random values thereafter.
from detr.
Related Issues (20)
- unable to download annoations from the main readme.md
- using vit as image backbone HOT 1
- Keyerror: image_id (training detr on custom dataset
- How to train with a custom dataset on mac m2?
- continuously growing memory
- Question about object queries. HOT 4
- I want to train the DETR model on a CPU. How can I make it possible on a small computer, 8gb RAM HOT 3
- Why positional encoding is added to different role in encoder and decoder. HOT 1
- 🐛 Bug: Architecture diagram in README.md renders incorrectly when using dark mode
- continue training with chekckpoint
- How to finetune DETR for semantic segmentation task?
- I do not understand what the mask meaning in "samlpes"
- Process finished with exit code 137 (interrupted by signal 9: SIGKILL)Please read & provide the following
- Very low performance for segmentation task.
- box_cxcywh_to_xyxy
- ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: -9) local_rank: 6 (pid: 257736) of binary: /home/public/anaconda3/envs/DL/bin/python
- Average Precision of each class for best epoch and then it's mean HOT 1
- the mAP is chage
- I think there are some errors in the posted code HOT 6
- Queries for images with low number of objects HOT 2
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 detr.