928f1d0b3ba401ea7614f19f3595e1a44c171205,maml_rl/utils/reinforcement_learning.py,,reinforce_loss,#Any#Any#Any#,29
Before Change
log_probs = pi.log_prob(episodes.actions.view((-1, *episodes.action_shape)))
log_probs = log_probs.view_as(episodes.actions)
if log_probs.dim() > 2:
log_probs = log_probs.sum(dim=2)
losses = -weighted_mean(log_probs * episodes.advantages,
lengths=episodes.lengths)
return losses.mean()
After Change
params=params)
log_probs = pi.log_prob(episodes.actions.view((-1, *episodes.action_shape)))
log_probs = log_probs.view(len(episodes), episodes.batch_size)
losses = -weighted_mean(log_probs * episodes.advantages,
lengths=episodes.lengths)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: tristandeleu/pytorch-maml-rl
Commit Name: 928f1d0b3ba401ea7614f19f3595e1a44c171205
Time: 2020-01-11
Author: tristan.deleu@gmail.com
File Name: maml_rl/utils/reinforcement_learning.py
Class Name:
Method Name: reinforce_loss
Project Name: cornellius-gp/gpytorch
Commit Name: 5272720e291d084e775df43a4e1920fedb48887b
Time: 2019-05-10
Author: balandat@fb.com
File Name: gpytorch/models/exact_gp.py
Class Name: ExactGP
Method Name: get_fantasy_model
Project Name: cornellius-gp/gpytorch
Commit Name: a7a12d157766b69cf4b1ddbb5fcdacfe485dc6fa
Time: 2019-04-03
Author: gpleiss@gmail.com
File Name: gpytorch/kernels/grid_kernel.py
Class Name: GridKernel
Method Name: forward