openai/supervised-reptile

Question reagarding the mata gradient computation.

SenHanami opened this issue · 0 comments

83th line in meta.py:

# Compute the meta gradient and return it, the gradient is from one episode
# in metalearner, it will merge all loss from different episode and sum over it.
loss, pred = self.net_pi(query_x, query_y)
grads_pi = autograd.grad(loss, self.net_pi.parameters(), create_graph=True)

should't the meta grad be (grad_of_net_pi - grad_of_net)?