Comments (1)
Line 316 in b940111
self.pred_loss(query_node_pred_generation, query_label.long()).mean()
For example, 5 way 1 shot, num_queries=1,
query_node_pred_generation
has shape of [batch_size, 5, 5]
query_label
has shape of [batch_size, 5]5 way 1 shot, num_queries=2,
query_node_pred_generation
have shape of [batch_size, 10, 5]
query_label
has shape of [batch_size, 10]In
query_node_pred_generation
, which dimension is the class (i.e., N ways)?
Dear Jing Li,
It is very unfortunate that the codebase is designed only for the setting of num_queries = 1
in the beginning.
We are sorry that the implementation of auxiliary loss (query_node_pred_loss
) confuses many readers. Therefore, we decided to propose a modified version that follows most people's intuition. The accuracy for the result of 5-way 1-shot, resnet12, mini-imagenet is still around 67.70±0.52 (almost the same as reported accuracy on the paper, 67.77).
Please replace the content at line 316-319 of main.py by the code below:
query_node_pred_loss = []
for query_node_pred_generation in query_node_pred_generations_:
temp_query_node_pred_generation = query_node_pred_generation.contiguous().view(-1, query_node_pred_generation.shape[-1])
temp_query_label = query_label.long().contiguous().view(-1, )
temp_loss = self.pred_loss(temp_query_node_pred_generation, temp_query_label).mean()
query_node_pred_loss.append(temp_loss)
Also, some configs need to be revised:
config['num_loss_generation'] = 7
train_opt['dec_lr'] = 18000
Let us know if you have any other confusion when using the DPGN.
Yours,
DPGN Team
from dpgn.
Related Issues (20)
- Question about avgpool size in backbone.py HOT 3
- Question about the dataset:CUB-200 HOT 1
- RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. HOT 2
- Questions about Resnet 12 backbone HOT 3
- 关于测试样本每类数目随机抽取的打乱测试 HOT 5
- ImportError: libcudart.so.9.0: cannot open shared object file: No such file or directory HOT 2
- Error running with CUB HOT 3
- About the num_queries HOT 1
- question about evaluation partition. HOT 1
- Ability to run my own data through the model HOT 3
- Show the image and label of query data HOT 1
- 请问一下您运行时的gpu条件是? HOT 2
- Could you please release the pre-trained conv4 model of miniImageNet?
- Could you release the config file of Conv4 in CUB?
- Question about backbone WRN
- trian CUB-200-2011 error HOT 1
- pickle file HOT 1
- the performance on mini-ImageNet HOT 1
- backbone of WRN and ResNet18
- 性能和论文中不符 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 dpgn.