brjathu / iTAML

Official implementation of "iTAML : An Incremental Task-Agnostic Meta-learning Approach". CVPR 2020
96 stars 16 forks source link

What is the difference between two output of model? -->outputs2, outputs = model(inputs) #14

Closed guanlinting closed 3 years ago

guanlinting commented 4 years ago

Thanks for open source your great work, I'm confused when read the source code, the model has two same output x1 and x2.

    x1 = self.fc(x)
    x2 = self.fc(x)
    return x1, x2

In Learner, some time use x1, some times use x2 or both, like

outputs2, outputs = model(inputs) outputs2, = model(inputs)
, outputs = meta_model(inputs)

What is the purpose of such a design?

brjathu commented 4 years ago

Hi, sorry for the confusion. It’s was added to keep the api same across all the modules. It’s the same thing as single pass, and it should be (to reduce computation). Algorithmic wise it doesn’t change anything at all. We will polish the code to reduce the confusion. Thanks.