Comments (8)
Hi @Ereebay, Thanks for your interest in our work, meta_test()
is the adaptation process in the paper.
"I guess the meta training in the meta_test() is the adaptation process mentioned in the inference process. And the meta test without task knowledge is the task prediction." this is correct.
"But why does the task prediction happens after the adaptation in the code? It seems that you directly use the task_id to do the adaptation and class prediction." - On implementation wise, I do adaptation for all the tasks and store them, and the actual testing happens in the plot_cifar.ipynb file. Mainly because of computational efficiency so that I don't have to use GPUs and gradient updates at test time.
hope this answers your questions. feel free to ask if you have any questions.
from itaml.
Hi @brjathu, thanks for your reply, I have one more question about the parameters.
The model parameters contain the features parameters(theta) and the classifier's parameters (phi). In order to keep multi classifiers parameters, it can copy the base model parameters. But, the parameters of the features should be updated through all the tasks. In the code, it seems to be reset to the base too.
for task_idx in range(1+self.args.sess):
idx = np.where((np_targets>= task_idx*self.args.class_per_task) & (np_targets < (task_idx+1)*self.args.class_per_task))[0]
ai = self.args.class_per_task*task_idx
bi = self.args.class_per_task*(task_idx+1)
ii = 0
if(len(idx)>0):
sessions.append([task_idx, ii])
ii += 1
for i,(p,q) in enumerate(zip(model.parameters(), model_base.parameters())):
p=copy.deepcopy(q)
from itaml.
Hi, at the start of each inner loop update, we move from the model_base parameters to a task-specific parameter?
when copying, theta, and phi, both are copied, but only the theta and a part of phi corresponding that task is updated with gradients in the inner loop.
from itaml.
Hi, at the start of each inner loop update, we move from the model_base parameters to a task-specific parameter?
when copying, theta, and phi, both are copied, but only the theta and a part of phi corresponding that task is updated with gradients in the inner loop.
So the theta doesn't be updated through all the tasks? Because it shows that the model will copy the base model's parameters every task.
from itaml.
no, it will. after finishing a single loop starting from 122, it will replace model base with model.
see line 121,
model_base = copy.deepcopy(model)
from itaml.
θ is updated in the inner loop for all tasks
My confusion is about this sentence. I thought the theta is updated from the first to the last tasks. I'm afraid I misunderstood it. Does this mean theta updated form the base model for every task right? Not the previous task.
from itaml.
"Does this mean theta updated form the base model for every task right? Not the previous task." yes this is correct. sorry for the confusion. Although theta is updated form the base model for every task right, for each batch would be more meaningfull.
from itaml.
Thanks for your patient explanation again! It solves my confusion.
from itaml.
Related Issues (20)
- AttributeError: type object 'args' has no attribute 'overflow' HOT 2
- something wrong happends in training cifar10 HOT 3
- Where to check task accuracy and class accuracy? HOT 2
- Fair comparison HOT 2
- sys.argv[1] is out of range HOT 2
- train_mnist loss go to nan at Sess 3
- about adding parameters HOT 5
- about adding classes HOT 2
- Nan Loss during training MNIST dataset HOT 2
- Why BCE is used instead of CE with Softmax? HOT 1
- Something strange in the Algorithm 1.. HOT 4
- Something strange about the update of theta and psi in the inner loop HOT 6
- What is the difference between two output of model? -->outputs2, outputs = model(inputs) HOT 1
- Training script for ImageNet-100 HOT 2
- Running without CUDA HOT 2
- Code for other methods
- Obviously catastrophic forgetting HOT 3
- A question about theta and task-specific phi HOT 1
- Task prediction
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 itaml.