b6443232013e8d248fe26f59630d43bc9688df06,losses.py,,loss,#,25
Before Change
regression_diff - 0.5 / 9.0
)
regression_losses.append(regression_loss[positive_indices, :].mean())
return torch.stack(classification_losses).mean(), torch.stack(regression_losses).mean()
After Change
0.5 * 9.0 * torch.pow(regression_diff, 2),
regression_diff - 0.5 / 9.0
)
if positive_indices.sum() > 0:
regression_losses.append(regression_loss[positive_indices, :].mean())
else:
regression_losses.append(torch.Tensor([0]).float().cuda())
return torch.stack(classification_losses).mean(), torch.stack(regression_losses).mean()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: yhenon/pytorch-retinanet
Commit Name: b6443232013e8d248fe26f59630d43bc9688df06
Time: 2018-04-29
Author: yannhenon@gmail.com
File Name: losses.py
Class Name:
Method Name: loss
Project Name: VinF/deer
Commit Name: 613dd04ea10693f8ef39c6565cacb317053ae406
Time: 2016-03-17
Author: vincent.francois@gmail.com
File Name: General_Deep_Q_RL/q_networks/q_net_theano.py
Class Name: MyQNetwork
Method Name: _buildG_DQN_0
Project Name: VinF/deer
Commit Name: 3387546c8b639005e4a3eec2d2560b395c2ef6ba
Time: 2018-09-06
Author: vincent.francois@gmail.com
File Name: deer/learning_algos/NN_CRAR_keras.py
Class Name: NN
Method Name: encoder_model