CAML algorithm

Now, let's see how CAML works steps by step:

  1. Let's say we have a model f parameterized by a parameter θ and we have a distribution over tasks p(T). First, we randomly initialize the model parameter θ. We also initialize our context parameter 0= 0.
  2. Now, we sample some batch of tasks Ti from a distribution of tasks, that is, Ti ∼ p(T).
  1. Inner loop: For each task (Ti) in tasks (T), we sample k data points and prepare our train and test datasets:

Now, we set our context parameter to 0:

Then, we calculate loss on , minimize the loss using gradient descent, and learn the task specific parameter i:

  1. Outer loop: Now, we perform meta optimization in the test set—that is, here we try to minimize the loss in the test set and find the optimal parameter:

  1. Repeat steps 2 to step 4 for n number of iterations.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.12.156