79928c84cdf990ef6fe1043a3e4f74b9cc252642,eval.py,,eval_net,#Any#Any#Any#Any#,8
Before Change
net.eval()
tot = 0
for i, b in tqdm(enumerate(loader), desc="Validation round", unit="img") :
imgs = b["image"]
true_masks = b["mask"]
After Change
tot += F.cross_entropy(mask_pred.unsqueeze(dim=0), true_mask.unsqueeze(dim=0)).item()
else:
tot += dice_coeff(mask_pred, true_mask.squeeze(dim=1)).item()
pbar.update(imgs.shape[0] )
return tot / n_val
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances Project Name: milesial/Pytorch-UNet
Commit Name: 79928c84cdf990ef6fe1043a3e4f74b9cc252642
Time: 2019-11-23
Author: milesial@users.noreply.github.com
File Name: eval.py
Class Name:
Method Name: eval_net
Project Name: PyThaiNLP/pythainlp
Commit Name: dff9fec2881dfb43222ad1c84aa95fd8c42715c8
Time: 2019-07-25
Author: wannaphong@yahoo.com
File Name: pythainlp/corpus/__init__.py
Class Name:
Method Name: _download
Project Name: fgnt/pb_bss
Commit Name: 6095e9ebdac6636d76b0bf33734e156beb3104c4
Time: 2018-05-15
Author: cbj@mail.uni-paderborn.de
File Name: dc_integration/distribution/cacgmm.py
Class Name: ComplexAngularCentralGaussianMixtureModel
Method Name: fit
Project Name: deepfakes/faceswap
Commit Name: 8f5a7a653528fd887a6106e610964a01591ed09c
Time: 2019-11-29
Author: 36920800+torzdf@users.noreply.github.com
File Name: tools/sort.py
Class Name: Sort
Method Name: _get_landmarks